Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Q

Status
Not open for further replies.

baillie

Programmer
Jun 19, 2001
6
0
0
CA
Hi all,

We have a file server that connects to various types of databases (MySQL, MS Access, SQL Server, etc). The server can be configured such that it may be connected to any or all of the databases at once.

Now that this is all possible and working, I need to be able to tell which database a given HSTMT has access to.

Is there an ODBC call that can get this information? I know there is SQLGetInfo, but it uses an HDBC not an HSTMT. Is it possible to get an HSTMT's associated HDBC? That way I could use SQLGetInfo. I really don't want to go back and change a ton of code so that I could more easily track what database is being used at any given time. Some of this code is quite old and reworking it would be gross. I wish that was done at the beginning. Hind sight is great.

Any help will be appreciated.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top