Connections with Gupta hangs
- From: "Mikael Lenfors" <mikael@xxxxxxxxxx>
- Date: Mon, 11 Sep 2006 17:02:25 +0200
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;
.
- Follow-Ups:
- Re: Connections with Gupta hangs
- From: Dennis Passmore
- Re: Connections with Gupta hangs
- Prev by Date: Re: Install the components of "SMComponent"
- Next by Date: Re: Connections with Gupta hangs
- Previous by thread: Install the components of "SMComponent"
- Next by thread: Re: Connections with Gupta hangs
- Index(es):
Relevant Pages
|