ADODB.Connection Question

bsnarles

New member
Joined
May 16, 2012
Messages
2
Programming Experience
Beginner
I am trying to cover all cases as if a user were to attempt to try and crash my program. I am unsure how to handle a ADODB.Connection instance if the user inputs bad login information. Currently in my program, if there is bad login information then the program jumps to the errhandler and I display the errors saying bad login and then clear the errors using the adodb error.clear method. This works fine until the user tries to login again. For some reason the adodb.state method gets set to Nothing and is unable to attempt logging in again. Is there something I should be doing after a bad login attempt or am I handling this situation incorrectly?

Sorry if this has been answered in the past. I tried searching but was unable to come up with an answer. Thanks.
 
The state method is probably nothing because the object to which that property belongs is nothing. You must re-instantiate your connection object (= new Connection) and attempt to reconnect again.
 
Back
Top