#!/usr/bin/perl -l --
use strict;
use warnings;
use DBI;
delete $ENV{LANG};
$ENV{SYBASE}='/opt/sybase';
my $dbh = DBI->connect('DBI:Sybase:server=asus','sa','') or die $DBI::errstr;
print "Let's go!";
print $dbh->selectrow_array(<<'SQL');
select count(*)
from syskeys
where type = 1
SQL
print "And now placeholders!";
print $dbh->selectrow_array(<<'SQL', undef, 1);
select count(*)
from syskeys
where type = ?
SQL
print "END.";
####
ccn@asus:~/tmp$ perl sy.pl
Let's go!
19
And now placeholders!
ct_send(CS_DESCRIBE_INPUT) returned 0 at /usr/lib/perl5/DBD/Sybase.pm line 124.
Segmentation fault
ccn@asus:~/tmp$
####
dbd_preparse parameter :p1 ()
dbd_preparse scanned 1 distinct placeholders
syb_st_prepare: ct_dynamic(CS_PREPARE) for DBD1
ct_send(CS_DESCRIBE_INPUT) returned 0 at /usr/lib/perl5/DBD/Sybase.pm line 124.
syb_st_prepare: ct_dynamic(CS_DESCRIBE_INPUT) for DBD1
syb_st_prepare: ct_results(CS_DESCRIBE_INPUT) for DBD1 - restype 4051
Segmentation fault