freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Arnar" <arnar AT seppuku.net>
- To: freetds AT franklin.oit.unc.edu
- Subject: Problem using dynamic SQL (?) with Perl DBD/DBI.
- Date: Fri, 2 Nov 2001 16:39:43 -0500
Hi all,
I'm having some trouble with dynamic SQL, freetds, and Perl DBI with
DBD/Sybase against an MS/SQL 2000 server. I'm at the point where I can
successfully connect to the database and query it, no problem. The
problem is that when I try to use dynamic SQL (? placeholders), I get this
error message:
Panic: dynamic SQL (? placeholders) are not supported by the server you
are connecting to at
/usr/lib/perl5/site_perl/5.6.0/i586-linux/DBD/Sybase.pm line 95.
Here's the perl script I'm using.
use DBI;
$dbh = DBI->connect('dbi:Sybase:server=servername', 'user', 'pass') or
die ("Couldn't connect to database\n");
$sth = $dbh->prepare("select * from tablename where id = ?");
$sth->execute(1);
$dbh -> disconnect;
So, is this even supported, or am I going about this completely the wrong
way?
Environment:
- SuSE Linux 7.0
- Perl v5.6.0
- DBD-Sybase-0.91
- freetds-0.53
- Win2k server, MS SQL 2000
FreeTDS was configured with "--with-tdsver=7.0", but I am using the
directive "tds version = 4.2" in /usr/local/freetds/etc/freetds.conf
because if I use 7.0 there, I got a segfault in tds7_send_login().
regards,
Arnar
-
Re: Problem using dynamic SQL (?) with Perl DBD/DBI.,
Michael Peppler, 11/02/2001
- <Possible follow-up(s)>
- Problem using dynamic SQL (?) with Perl DBD/DBI., Arnar, 11/02/2001
Archive powered by MHonArc 2.6.24.