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: Tue, 2 May 2006 17:32:53 +0200

>
> Hi guys
>
> I have a couple of questions regarding using
> FreeTDS ODBC on
> windows. Let me first explain what I got working so far.
>
>
>
> I am able to connect to a SQL server from windows
> using FreeTDS
> odbc IF I specify the dsn information using the windows 'ODBC
> Data Source
> Administrator' control panel. I enter in all the details
> about the server
> (including name, port, database) and it creates an entry in
> the odbc.ini
> file like this:
>
>
>
> [mydsn]
>
> Driver32=C:\WINNT\System32\FreeTDS.dll
>
>


In windows odbc.ini is usually virtualized on registry so you should put
entries on HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI or
HKEY_CURRENT_USER\Software\ODBC\ODBC.INI.

>
> The rest of the information about that dsn (mydsn) is saved
> in the windows
> registry. This works fine; but what I was trying to do was
> connect to a dsn
> without using the 'gui ADD a new System DataSource' dialog
> box that is
> found in the windows control panel. Ideally; what I would
> like to do is have
> FreeTDS just read the freetds.conf file and gather all its
> information from
> that file instead of looking in the odbc.ini file and the registry.
>
>
>
> I came across this page on the FreeTDS list:
> http://www.freetdsorg/userguide/prepodbc.htm
> <http://www.freetds.org/userguide/prepodbc.htm>
>
> It mentions the 3 choices for ODBC (DSN-less, ODBC-only,
> ODBC-combined). I
> figure the one I would use is the ODBC-combined since I can
> just write the
> dsn names in the odbc.ini file and have all the information in the
> freetds.conf file. Does the 'DSN-less' option mean that I just need a
> freetds.conf file? How do I enable these options?
>

DSN-less means no odbc.ini (or registry), simply you pass options you
use in odbc.ini using SQLDriverConnect. Using Servername option you will
use freetds.conf.

>
>
> In summary, I would like to connect to a data source using
> FreeTDS without
> actually writing to the windows registry all the information for a dsn
> specified in the odbc.ini file.
>
>
>
> Thanks in advance
>
> Nav
>

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page