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.
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.