freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Frederik Teerlinck" <largowww AT gmail.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] USE database in ODBC v3
- Date: Tue, 16 Jan 2007 14:10:32 +0100
Yes, That was the problem. Thanx for the quick response.
2007/1/16, ZIGLIO, Frediano, VF-IT <Frediano.Ziglio AT vodafone.com>:
>
> 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.
Should work even on odbc v3. Note that should be strlen(MY_DB_NAME), not
sizeof(MY_DB_NAME), or, if MY_DB_NAME is #defined as a constant strings
should be sizeof(MY_DB_NAME)-1
freddy77
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] USE database in ODBC v3,
Frederik Teerlinck, 01/16/2007
- <Possible follow-up(s)>
-
Re: [freetds] USE database in ODBC v3,
ZIGLIO, Frediano, VF-IT, 01/16/2007
- Re: [freetds] USE database in ODBC v3, Frederik Teerlinck, 01/16/2007
Archive powered by MHonArc 2.6.24.