updating the "state" attribute of a connection object without executing a command in msado

  ado, c++, database, sql, sql-server

Im having an issue where im trying to use the "State" member of a _ConnectionPtr to check the status of a connection that i have to an SQL server using msado in C++. The issue in question is that when using it to check the connection, it will only update AFTER calling some functionality (which fails). This is not useful as im trying to pro-actively detect issues with the connection before trying to run some functionality.

Does anyone have a way of updating this member without trying to execute some SQL or any other ways in which to check for an active connection?

Source: Windows Questions C++