DBD::ODBC 1.06 Problem with prepare when using newer MS SQL ODBC driver
From: Martin Busik (martinb_at_mediascape.de)
Date: 11/12/03
- Next message: Unknown Sender: "Re: help for DBD::Oracle module"
- Previous message: Jos I. Boumans: "Re: No warning when missing driver?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Nov 2003 08:52:51 -0800
Hi there,
given the following example:
--------------- SNIP SNIP ---------
use DBI;
$connection = DBI->connect("DBI:ODBC:mydb", q(user), q(passw));
if(($DBI::err != 0) || !$connection) {
die "not connected!\n";
}
$csr = $connection->prepare("select 1 from table_that_does_not_exist");
if(($DBI::err != 0) || !$csr) {
die "got no cursor!\n$DBI::err\n$DBI::errstr\n";
}
if(!defined($csr->{NUM_OF_PARAMS}) || !$csr->{NUM_OF_PARAMS}) {
print "executing!\n";
$csr->execute();
print "executed!\n";
} else {
print "not executed!\n";
}
$connection->disconnect();
------------- SNIP SNIP ------------
When connecting to a ms sql database on a win32 plattform
using the odbc driver version 3.70.08.21, prepare fails as expected.
when connecting to the same database on a win32 plattform
using the odbc driver version 2000.81.9031.14, prepare does not fail.
Failure occurs at the subsequent $csr->{NUM_OF_PARAMS} expression.
Does anybody have the same problem? Is there any special initialization/setup
of the 2000.xxx driver necessary?
Regards,
Martin
- Next message: Unknown Sender: "Re: help for DBD::Oracle module"
- Previous message: Jos I. Boumans: "Re: No warning when missing driver?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|