25.11.2014 Views

Problem using dynamic SQL (?) with Perl DBD/DBI.

Problem using dynamic SQL (?) with Perl DBD/DBI.

Problem using dynamic SQL (?) with Perl DBD/DBI.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Problem</strong> <strong>using</strong> <strong>dynamic</strong> <strong>SQL</strong> (?) <strong>with</strong> <strong>Perl</strong> <strong>DBD</strong>/<strong>DBI</strong>.<br />

<strong>Problem</strong> <strong>using</strong> <strong>dynamic</strong> <strong>SQL</strong> (?) <strong>with</strong> <strong>Perl</strong> <strong>DBD</strong>/<br />

<strong>DBI</strong>.<br />

Arnar arnar at seppuku.net<br />

Fri Nov 2 16:39:43 EST 2001<br />

● Previous message: <strong>Problem</strong> <strong>using</strong> <strong>dynamic</strong> <strong>SQL</strong> (?) <strong>with</strong> <strong>Perl</strong> <strong>DBD</strong>/<strong>DBI</strong>.<br />

● Next message: Installing FreeTDS on Win32 systems<br />

● Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]<br />

Hi all,<br />

I'm having some trouble <strong>with</strong> <strong>dynamic</strong> <strong>SQL</strong>, freetds, and <strong>Perl</strong> <strong>DBI</strong> <strong>with</strong><br />

<strong>DBD</strong>/Sybase against an MS/<strong>SQL</strong> 2000 server. I'm at the point where I<br />

can<br />

successfully connect to the database and query it, no problem. The<br />

problem is that when I try to use <strong>dynamic</strong> <strong>SQL</strong> (? placeholders), I get<br />

this<br />

error message:<br />

Panic: <strong>dynamic</strong> <strong>SQL</strong> (? placeholders) are not supported by the server<br />

you<br />

are connecting to at<br />

/usr/lib/perl5/site_perl/5.6.0/i586-linux/<strong>DBD</strong>/Sybase.pm line 95.<br />

Here's the perl script I'm <strong>using</strong>.<br />

use <strong>DBI</strong>;<br />

$dbh = <strong>DBI</strong>->connect('dbi:Sybase:server=servername', 'user', 'pass')<br />

or<br />

die ("Couldn't connect to database\n");<br />

$sth = $dbh->prepare("select * from tablename where id = ?");<br />

$sth->execute(1);<br />

$dbh -> disconnect;<br />

http://lists.ibiblio.org/pipermail/freetds/2001q4/005657.html (1 of 2)10/6/2005 10:16:54 AM


<strong>Problem</strong> <strong>using</strong> <strong>dynamic</strong> <strong>SQL</strong> (?) <strong>with</strong> <strong>Perl</strong> <strong>DBD</strong>/<strong>DBI</strong>.<br />

So, is this even supported, or am I going about this completely the<br />

wrong<br />

way?<br />

Environment:<br />

- SuSE Linux 7.0<br />

- <strong>Perl</strong> v5.6.0<br />

- <strong>DBD</strong>-Sybase-0.91<br />

- freetds-0.53<br />

- Win2k server, MS <strong>SQL</strong> 2000<br />

FreeTDS was configured <strong>with</strong> "--<strong>with</strong>-tdsver=7.0", but I am <strong>using</strong> the<br />

directive "tds version = 4.2" in /usr/local/freetds/etc/freetds.conf<br />

because if I use 7.0 there, I got a segfault in tds7_send_login().<br />

regards,<br />

Arnar<br />

● Previous message: <strong>Problem</strong> <strong>using</strong> <strong>dynamic</strong> <strong>SQL</strong> (?) <strong>with</strong> <strong>Perl</strong> <strong>DBD</strong>/<strong>DBI</strong>.<br />

● Next message: Installing FreeTDS on Win32 systems<br />

● Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]<br />

More information about the FreeTDS mailing list<br />

http://lists.ibiblio.org/pipermail/freetds/2001q4/005657.html (2 of 2)10/6/2005 10:16:54 AM

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!