freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Zachariah Mully" <zmully AT smartbrief.com>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: Perl and ODBC
- Date: Wed, 16 May 2001 10:44:32 -0400
All-
Thanks for the tip... I have upgraded to the latest snapshot (not sure
what version # it is) as well as upgrading to the lastest version of
iODBC (3.0.4). I recompiled everything and I was able to verify with
sqsh and DBD::Sybase that freetds was working, but for the life of me I
cannot get DBD::ODBC working through the iODBC driver manager. I have
confirmed that the freetds odbc libraries were built and are in the
specified locations. The client is linux 2.2.16smp (Redhat 7.1 based)
and the server is NT2000 with SQL2000. My environment variables TDSVER,
SYBASE, ODBCINI and ODBCHOME are set to 70, /usr/local/freetds,
/etc/odbc.ini and /usr/local respectively.
My odbc.ini looks like:
[ODBC Data Sources]
princess = test server
[princess]
Driver = /usr/local/freetds/lib/libtdsodbc.so
Description = test server
Host = xxxxxxx.xxxxxxxx.xxx
ServerType = odbc
FetchBufferSize = 99
uid = xxxx
pwd = xxxx
Database = xxxx
ReadOnly = no
Trace = 0
TraceFile = /tmp/iodbc.trace
I have tried to connect through iODBC's odbctest and I get the
following error:
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor
Enter ODBC connect string (? shows list): dsn=princess
Could not find DSN in connect string, SQLSTATE=08001
When I run this test perl script:
#!/usr/local/bin/perl
use DBI;
my $dbh = DBI->connect("dbi:ODBC:princess");
die "Unable for connect to server $DBI::errstr"
unless $dbh;
my $rc;
my $sth;
$sth = $dbh->prepare("select \@\@servername");
if($sth->execute) {
while(@dat = $sth->fetchrow) {
print "@dat\n";
}
}
It returns the following error:
DBI->connect(princess) failed: Could not find Database parameter
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at ./odbc.pl line 3
This would leave me to believe that my odbc.ini is improperly setup...
Can anyone tell me what I've configured wrong? This is driving me nuts
and the iODBC site is of absolutely no help whatsoever.
Thanks again,
Zack
-----Original Message-----
From: bounce-freetds-131041 AT franklin.oit.unc.edu
[mailto:bounce-freetds-131041 AT franklin.oit.unc.edu]On Behalf Of Brian
Bruns
Sent: Monday, May 14, 2001 10:47 PM
To: TDS Development Group
Subject: [freetds] Re: Perl and ODBC
You need a current version from CVS. Most of the DBI::ODBC stuff was
added after 0.51.
Cheers,
Brian
-
Perl and ODBC,
Zachariah Mully, 05/14/2001
- <Possible follow-up(s)>
- Re: Perl and ODBC, Brian Bruns, 05/14/2001
- Re: Perl and ODBC, James K. Lowden, 05/15/2001
- Re: Perl and ODBC, Zachariah Mully, 05/16/2001
Archive powered by MHonArc 2.6.24.