How to check database connection in VB?
-
Hi! All, Can anybody tell me how to check the availability of a database connection in VB? Thanks and Regards, virendra
-
Hi! All, Can anybody tell me how to check the availability of a database connection in VB? Thanks and Regards, virendra
hi virendra, if you have created the recordset then check for recordset.state property if recordset.state = 1 then connection is open and if it is '0' then connection is close best regards, koolprasd2003:)
Be A Good S/W Eng... Life is swing with you..Enjoy..
-
Hi! All, Can anybody tell me how to check the availability of a database connection in VB? Thanks and Regards, virendra
What do you mean? I'm purely guessing at what you want, but about the only way to know is to actually TRY the connection and see if it fails.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
hi virendra, if you have created the recordset then check for recordset.state property if recordset.state = 1 then connection is open and if it is '0' then connection is close best regards, koolprasd2003:)
Be A Good S/W Eng... Life is swing with you..Enjoy..
Hi, I think you mean .State property. For eg:- dim adocn as new ADODB.Connection Then we can check whether connection is open or not by adocn.State