Skip to Content.
Sympa Menu

freetds - Re: [freetds] Using FreeTDS ODBC on Windows

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Using FreeTDS ODBC on Windows
  • Date: Wed, 3 May 2006 11:55:32 +0200

>
> Hi all
>             I have gotten it to work using the 'Connection
> String' that I
> passed into SqlDriverConnect. Here is the connection string
> that I used:
> ""Servername=my_server;UID=username;PWD=passwd;TDS_Version=7.0
> " Using this;
> I am able to connect and issue a statement to the sql server.
> IF I run the
> SQL Profiler on te server: I can see that the server got the
> statement. For
> some reason though; SQLExecDirect () returns a -1 after I
> call it. The weird
> thing is that If I use the 'ODBC' configuration; then I am
> able to pass in
> the same statement and have it be executed correctly.  
>
> Any tips?
> Thanks
> Nav
>

Yes, you have to specify driver option like

"Driver=FreeTDS;Servername=my_server;UID=username;PWD=passwd;TDS_Version=7.0"

Note that "FreeTDS" has to be registered as ODBC driver (as installer does).
I don't know if Driver=c:\path\whatever\freetds.dll works.

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page