Connections with Gupta hangs



Hello! I have an application looping through all our stores. For each store
I create a ADOConnection and then I execute an ADOQuery. After this I close
the ADOQuery and the ADOConnection and move on to the next store.

My problem is that sometimes (every 500 connection or so) the ADOQuery hangs
on OPEN.
I tried to set CommandTimeout without ant improvement.
The database is an Gupta SQLBase and the driver version is 9.00.01.13768

Below i part of the code that can be of interest...

Regards, Mikael


-- Code to setup my connection
ConnStr := 'Provider=SQLBASEOLEDB.1;';
ConnStr := ConnStr + 'Password="' + SQLPassword + '";';
ConnStr := ConnStr + 'Persist Security Info=True;';
ConnStr := ConnStr + 'User ID=' + SQLUserName + ';';
ConnStr := ConnStr + 'Data Source=' + SQLServerName +';';
ADOStoreConnection.ConnectionString := ConnStr;
ADOStoreConnection.CommandTimeout := 30;
ADOStoreConnection.ConnectionTimeout := 10;
ADOStoreConnection.CursorLocation := clUseClient;
ADOStoreConnection.KeepConnection := False;
ADOStoreConnection.LoginPrompt := False;
ADOStoreConnection.Open;
ADOStoreQuery.CommandTimeout := 30;
ADOStoreQuery.ExecuteOptions := [eoAsyncFetchNonBlocking];
ADOStoreQuery.CursorLocation := clUseClient;

-- Code for my query (it hangs on Open)
DBForm.ADOStoreQuery.SQL.Clear;
DBForm.ADOStoreQuery.SQL.Add('Select Sum(SoldValue) As SoldValue,
Sum(SoldQuant) As SoldQuant, Sum(SoldDisc) As SoldDisc');
DBForm.ADOStoreQuery.SQL.Add('From SoldDayArtTemp');
DBForm.ADOStoreQuery.SQL.Add('Where Shop = ' + Store);
DBForm.ADOStoreQuery.SQL.Add('And Period = ' +
QuotedStr(FormatDateTime('yyyy-mm-dd', Now)));
DBForm.ADOStoreQuery.Open;


.



Relevant Pages

  • ADOConnection fail after a while in TThread
    ... I have a problem when using ADO components in a thread. ... connect to the store databases and in every thread I get an exception in ... One strange thing is that I have a ADOConnection in the main thread as well. ... If ConnectDB Then ...
    (borland.public.delphi.database.ado)
  • Re: TADOConnection LogInPrompt
    ... interesting thing is that if I set loginprompt to true then I get the ... It's as if the ADOConnection and the ADOQuery are both ... Pascal before that) and I've been using ADO components to access Access ...
    (borland.public.delphi.database.ado)
  • Re: How to access MSSQL through ISAPI Filter?
    ... First I thought I also had to use a Critical Section but it seems that Critical Sections are not necessary because the adoConnection and adoQuery variables in your example are local variables. ... Here, adoConnection, adoQuery and CS are global vars, I thought I ... could reuse these connections. ...
    (borland.public.delphi.database.ado)
  • Re: How to access MSSQL through ISAPI Filter?
    ... Kees de Winter wrote: ... adoConnection:= TAdoConnection.Create; ... Here, adoConnection, adoQuery and CS are global vars, I thought I ... What am I doing wrong (using Delphi 5 ...
    (borland.public.delphi.database.ado)
  • How to access MSSQL through ISAPI Filter
    ... procedure InitializeDBConnection; ... adoConnection:= TAdoConnection.Create; ... adoConnection.ConnectionString:= GetConnStringFromRegistry; ... Here, adoConnection, adoQuery and CS are global vars, I thought I could ...
    (borland.public.delphi.database.ado)