Board index » delphi » Multiple connections - database timeouts

Multiple connections - database timeouts

Hello All,

I am trying out an ISAPI application that connects and inserts into the
database.  When the transactions are evenly distributed,  the updates and
inserts appear to work fine.

However, when many concurrent transactions occur, say 10 or more, I get a
message :

'Cannot perform this operation on an open database'.

The code snippet is as below :

TdmoDb : class( TDataModule )
        qryX : TQuery
    private
    {}
    public
    {}
end ;

var
     dmoDb : TdmoDb ;

function prifuInsertX( var sErrMsg : string )
begin
    try
        dmoDb .qryX.DatabaseName := 'DatabaseName';
        dmoDb .qryX.SessionName  := 'SessionName' ;
        dmoDb .qryX.Active := True;

        dmoDb .qryX.Insert ;
        dmoDb.qryX.FieldbyName( 'A').AsInteger := 0 ;
        dmoDb .qryX.post ;

        dmoDb .qryX.Active := False;

        Result := 1 ;
    except
        On E : Exception do
        begin
            Result := 0;
            sErrMsg := E.Message;
        end;
end;

Is there any way I can set a timeout value.

The database is Oracle 7.3.

Thanks.

Diwakar

 

Re:Multiple connections - database timeouts


Quote
Diwakar C K wrote:

> Hello All,

> I am trying out an ISAPI application that connects and inserts into the
> database.  When the transactions are evenly distributed,  the updates and
> inserts appear to work fine.

> However, when many concurrent transactions occur, say 10 or more, I get a
> message :

> 'Cannot perform this operation on an open database'.

> The code snippet is as below :

<CUT HERE>

> Is there any way I can set a timeout value.

> The database is Oracle 7.3.

You could use a TSession component and set the timeout property to a
higher value at runtime.

And in your code set the SessionName property to what you set for the
TSession component.

HTH

Rkr

--

                   \|||/
                   /'^'\
                  ( 0 0 )
--------------oOOO--(_)--OOOo--------------
. Reid Roman                              .
. Delphi Programmer                       .
. TVisualBasic:=class(None)               .
. May the Source be With You              .
-------------------------------------------
. Auto-By-Tel (http://www.autobytel.com)  .
. Irvine, CA U.S.A                        .
. E-Mail : rkroman (at) home (dot) com    .
-------------------------------------------

Other Threads