[freetds] USE database in ODBC v3

Frederik Teerlinck largowww at gmail.com
Tue Jan 16 04:31:40 EST 2007


Hi all,

I'm writing an application where I need data from 2 databases on the same
server. The problem I have is how to switch from one database to the other.
The only thing I found in the ODBC documentation is something like this:

SQLSetConnectAttr( connection, SQL_ATTR_CURRENT_CATALOG,
(SQLPOINTER)MY_DB_NAME, sizeof(MY_DB_NAME));

But according to the documentation this only works with ODBC v2 and I'm
using ODBC v3. And indeed, this is not working in my application.

Does anybody know how to do this?

regards,
Frederik.



More information about the FreeTDS mailing list