Re: Connections with Gupta hangs



ADOStoreConnection.Open;

Instead of calling Open on the ADOConnection try adding this
to your code and see if it helps.

type
TcADOConnection = class(TADOConnection);

-- 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;
TcADOConnection(ADOStoreConnection).CheckActive;


CheckActive is implemented in AdoDB.pas but it is Protected so it
can only be called from a descendant class that is why
the TcADOConnection was declared. CheckActive it will setup a
WaitTillComplete loop and not timeout right away.




.