| || |
reestablish ADODB connection
is anybody has an experience to reestablish ADODB connection
I try this code but it doesn’t:
If dbCon.State <> 1 Then dbCon = Open_Connection
Cursor move to Open_Connection and back, move to the next line and give an error :
ADODB.Connection: Operation is not allowed when the object is open.
Next line error:
Object value is set to Nothing
Re: reestablish ADODB connection
I am not sure if this helps but please try this
SQAConsolewrite "status " & dbCon.State
Check the output of the connection status
If the connection is open i.e. you are not closing the connection and trying to open it again it will give u the error "ADODB.Connection: Operation is not allowed when the object is open."
And Object value is Set to nothing means you have not opened the recordset and trying to use the array.
try this SQAConsolewrite " RecordCount " & rs.RecordCount and check what is the record count you are getting.
I am not sure but might give u another idea.