Re: emerge unixODBC freetds

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
rasiel payumo wrote:
> my odbc.ini is at /etc/unixODBC/odbc.ini 
> i had a feeling that my odbc.ini is not correct also here's what i've
> wrote:
> 
> [alpha]
   ^^^^^
This is the name you should be trying to connect to.

> Driver          = TDS
                    ^^^ 
There should be a section called [TDS] in your odbcinst.ini that points to
libtdsodbc.  

> Description     = puls3 mssql server
> Trace           = Yes
> TraceFile       = /tmp/unixodbc.trace
> Servername      = elk
> Server          = 172.30.79.40

You can't have both "server" and "servername".  I'm assuming you want an
ODBC-only setup?  If so, delete the servername line.  

http://www.freetds.org/userguide/odbcconnattr.htm

> Port            = 1433
> Database        = myTestDB
> UID             = sa
  ^^^ ignored, not a valid odbc.ini attribute.  See the user guide.  
> Language        = us_english

You should add:

TDS_Version = 7.0

 
> i don't have osql

Well, I did give you links to download the file in an earlier message.  I
don't know why I should repeat them, but here goes:

http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/doc/osql.txt?revision=1.4&view=markup

http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/src/apps/osql?revision=1.7&view=markup

You'll see "download" links on both pages.  You know what to do.  

For instructions on using osql, please see read osql.txt.  Since you're
new at this, a couple of hints:

1.  The file doesn't need to be "installed".  It's just a shell script,
not very different from (but much better than!) a .BAT file in Windows, if
you're familiar with them.  

2.  Unlike Windows, the current directory is not in the PATH; when you
say:

	$ osql -S alpha -U sa -P passwd

the system looks for "osql" in each directory mentioned in the PATH
environment variable, but *not* in the current directory.  So, to run a
script that's in the current directory, you do this instead:

	$ ./osql -S alpha -U sa -P passwd

HTH.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.