Front page | perl.dbi.users |
Postings from February 2001
bind param problem
Thread Previous
|
Thread Next
From:
Rajesh Yenumulapally
Date:
February 6, 2001 11:53
Subject:
bind param problem
Message ID:
20010206195304.6029.qmail@web10010.mail.yahoo.com
Hi
I wrote a script which uses a bind_param function of the DBI and it works perfectly fine on one server but
not on the other one. My first server has the perl 5.003/DBI 0.79 and my second server has perl
5.6.0/DBI 1.13.I noticed that the bind param function stopped taking empty strings as one of the parameter
on the new server.I am getting an error called "Bad file number" when I am trying to excute the
statement. So is it the problem with the DBD::Oracle driver or the DBI version or the PERL version.
Has any thing changed with the new versions of the drivers.Everything is working perfectly fine on my old server.Can any one
please tell me what the problem is????
the script is very simple and is as follows.......
**********************************************************
#!/usr/local/bin/perl
use DBI; # Only for DBI
print "Content-type: text/html\n\n";
$lda = DBI->connect( 'dpscs4', 'meweb01', 'meweb01',Oracle );
$sql = "insert into table_name ID_USER,ID_RACF,ID_ROLE,ID_LAST_UPDATE, DT_LAST_UPDATE)values(:TEST1,:TEST2,:TEST3,:TEST4,:TEST5)";
$csr = $lda -> prepare($sql) || die $ora_errstr;
$csr->bind_param(":TEST1","STEVE");
$csr->bind_param(":TEST2"," "); # here it dosen't take an empty string
$csr->bind_param(":TEST3","1");
$csr->bind_param(":TEST4","RYENUMUL");
$csr->bind_param(":TEST5","2000-12-09");
if( $csr -> execute )
{
print "Could execute\n";
$ret = $lda->commit ;
$csr -> finish;
}
else{
print "Could not execute because: $!\n";
}
$ret = $lda->disconnect;
---------------------------------
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
Thread Previous
|
Thread Next