Sharad_2 0 Newbie Poster
cnsrvlist3.open "Provider=SQLOLEDB.1;Data Source="& strDrserver &";Integrated Security=SSPI"
msgbox("ABC")
msgbox(cnsrvlist3.state)
cmdsrvlist3.activeconnection = cnsrvlist3     

I am trying to check the state of connection, The code works fine if the connection is fine but when any Database server is down then in that case the state should come as 0 instead of that it gives me error that Database in accessible or access denied.

Can you please let me know if DB servicea are down then in that case how to check connection state.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.