Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Perl/Oracle problem with placeholders

Perl/Oracle problem with placeholders

From: M.D. Mackey <mdm1004_at_cus.cam.ac.uk>
Date: 17 Jan 2001 16:15:30 GMT
Message-ID: <944gf2$7f8$1@pegasus.csx.cam.ac.uk>

Hi all.

I'm having a problem with the Oracle/Perl installation on a machine here. The DBI stuff works fine, except that I can't use placeholders of any sort. Example code:

8<-----------------------------------------------------------
#!/usr/local/bin/perl

use DBI;

$dsn='dbi:Oracle:databasename';

my($dbh)=DBI->connect($dsn,"user","pass",{RaiseError=>1});
$dbh->trace(1);

# This works:
#my($sql)="select id from ecdsdat.table where id = '123456' ";

# This doesn't
my($sql)="select id from ecdsdat.table where id = ? ";

$sth = $dbh->prepare($sql);
$sth->bind_param(1,'123456');

my $rv = $sth->execute();
while (my $row = $sth->fetchrow_arrayref) {   print $row->[0], "\n" ;
}

8<-----------------------------------------------------------

This works fine on one machine, but dies with

!! ERROR: 1460 'ORA-01460: unimplemented or unreasonable conversion requested (DBD: oexfet error)'

at the execute() line on another.

I suspect that this is an Oracle problem rather than a Perl problem, since I can copy the entire Perl installation from the 'working' machine to the 'non-working' machine and still get the same error. The two machines are both running the same version of Oracle, but I don't have the access permissions required to check and see what differences there are between the Oracle installations at this stage.

Both work fine with the sql statement with no placeholder.

(Perl 5.005_03, DBI 1.13 DBD::Oracle 1.03, Oracle 8.0.5, IRIX 6.5)

Any suggestions?

-- 
Mark Mackey   http://www.ch.cam.ac.uk/MMRG/people/mdm/
code code code code code code code code code code code code code bug code co
de code code code bug code code code code code code code code code code code
code code code code code code code code code code code code code code code c
Received on Wed Jan 17 2001 - 10:15:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US