Skip to Content.
Sympa Menu

freetds - Re: FreeTDS woes..

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: FreeTDS woes..
  • Date: Tue, 4 Dec 2001 17:08:27 -0500 (EST)



You need a entry in the odbc.ini file (under the pivotal section)

[pivotal]
...
Servername = <yourservername>
...

Where <yourservername> is the server alias listed in your freetds.conf
file. I would highly recommend grabbing sqsh (www.sqsh.org) and building
it to make sure your freetds install and freetds.conf file are correct.

This was discussed about a week ago on the list and a change was checked
in then to say 'Servername' instead of 'Database'. i.e. There's an error
in the error message. :-/

Cheers,

Brian

P.S. Is it just me, or has there been a whole rash of ODBC questions
lately?


On Tue, 4 Dec 2001, Casey Allen Shobe wrote:

> I'm still in utter failure after a full day's work.
>
> I finally got the thing to seemingly install correctly (at least to the
> point
> that I could start Apache/PHP and still use DB2) by using iODBC. I pointed
> iODBC at my db2 stuff and db2 queries work fine!
>
> However, the FreeTDS stuff seems to be getting nowhere...
>
> odbc.ini:
> [ODBC Data Sources]
> sw_p = IBM DB2 Connect Driver
> pivotal = FreeTDS Driver
>
> [Default]
> driver = /usr/lib/oplodbc.so.1
>
> [sw_p]
> Description = DB2 Production Database
> Options = sw_p
> Port = 523
> Protocol = TCP/IP
> Driver = /usr/DBMdb2/V7.1/lib/libdb2.so.1
> Database = sw
> FetchBufferSize = 99
>
> [pivotal]
> Description = Pivotal Production Database
> Options = sw_enterprise_data
> Port = 1433
> Host = 192.168.24.6
> ServerType = SQLServer 2000
> Protocol = TCP/IP
> Driver = /usr/lib/libtdsodbc.so
> Database = sw_enterprise_data
> FetchBufferSize = 99
> Trace = No
>
>
>
> odbcinst.ini:
> [ODBC Drivers]
> IBM DB2 Connect Driver = Installed
> FreeTDS Driver = Installed
>
> [IBM DB2 Connect Driver]
> Driver = /usr/IBMdb2/V7.1/lib/libdb2.so.1
> Setup = /usr/IBMdb2/V7.1/lib/libdb2.so.1
>
> [FreeTDS Driver]
> Driver = /usr/lib/libtdsodbc.so
> Setup = /usr/lib/libtdsodbc.so
>
>
>
> test.php:
> <?php
>
> $piv_conn = odbc_connect ('pivotal', 'SECUREWORKS\cshobe', 'password');
> $dbtest = odbc_exec ($piv_conn, 'select * from company');
>
> ?>
>
>
>
> I get the following when I try to load it:
>
> Warning: SQL error: Could not find Database parameter, SQL state 08001 in
> SQLConnect in test.php on line 3.
> Warning: Supplied argument is not a valid ODBC-Link resource in test.php on
> line 4.
>
>
> Help please!! I'm stuck and don't know where to go from here.
>
>





Archive powered by MHonArc 2.6.24.

Top of Page