Re: Connections with Gupta hangs



Thanks , I tried it but it didn't help! Any more ideas?

regards, Mikael


"Dennis Passmore" <dennisp@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:ct6bg25t85dav141a3r6q3tihcefr5mk6q@xxxxxxxxxx
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.






.