Re: [DBD::Sybase] Prepare = Segmentation fault
[email protected] Wed, 31 May 2006 16:20:50 +0200
| Newsgroups | gmane.comp.lang.perl.modules.dbi.sybase |
|---|---|
| Message-ID | <[email protected]> |
FreeTDS doesn't yet support the placeholder functionality in its client library implementation. You should take this up with the FreeTDS development team. Michael Internet [email protected]@peppler.org - 31/05/2006 15:21 Sent by: [email protected] To: sybperl-l cc: Subject: [DBD::Sybase] Prepare = Segmentation fault Hello, After searching for a while on Google, I am still not able to find an answer to the following issue. Running $dbh->prepare($sql) fails because of a segmentation fault. I don't manage to fix this issue. Any idea about this would be welcome. Code sample : #!/usr/bin/perl -w use DBI; my $name = "user"; my $pass = "pass"; my $conn = 'DBI:Sybase:server=monserver'; my $dbh = DBI->connect($conn, $name, $pass); print "W0 - Preparing\n"; my $sth = $dbh->prepare("SELECT ISDATE(?)"); # Note I use a parameter '?' in the sql query. print "W0 - Executing\n"; $sth->execute('1970-01-01'); Run : $ ./test.pl W0 - Preparing ct_send(CS_DESCRIBE_INPUT) returned 0 at /usr/local/lib/perl/5.8.7/DBD/Sybase.pm line 133. Erreur de segmentation Environnement : Perl v5.8.7 DBI::DBD v11.21 DBD::Sybase V1.07 FreeTDS V0.63 Note 1 : if you replace the 3 last lines with the following code, everything works fine. my $sth = $dbh->prepare("SELECT ISDATE('1970-01-01')"); print "W0 - Executing\n"; $sth->execute(); Note 2 : adapting the code to be run on Windows with ActivePerl + ODBC + Windows MS SQL Driver, the $dbh->prepare("SELECT ISDATE(?)") and $sth->execute('1970-01-01') statements work fine. Many thanks forward for your help. -- Maxime MARAIS Kertel. This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. --------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie.