DBD::Oracle::db prepare failed: ORA-00932: inconsistent datatypes

"H.Merijn Brand" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
I cannot do a bind_param () before I prepare, but prepare () already
fails :(

$ cat test.pl
use strict;
use warnings;

use DBI;

my $dbh = DBI->connect ("dbi:Oracle:", $ENV{DBI_USER}, $ENV{DBI_PASS}, {
    PrintError       => 1,
    RaiseError       => 1,
    PrintWarn        => 1,
    FetchHashKeyName => "NAME_lc",
    AutoCommit       => 0,
    }) or die "Connect: $DBI::errstr\n";

$dbh->do (qq;
    create global temporary table t_foo (
	h_key	blob,
	h_value	blob
	);
    );

my $sth = $dbh->prepare ("select h_value from t_foo where h_key = ?");
$ perl test.pl
DBD::Oracle::db prepare failed: ORA-00932: inconsistent datatypes: expected - got BLOB (DBD ERROR: error possibly near <*> indicator at char 32 in 'select h_value from t_foo where <*>h_key = :p1') [for Statement "select h_value from t_foo where h_key = ?"] at test.pl line 23.
DBD::Oracle::db prepare failed: ORA-00932: inconsistent datatypes: expected - got BLOB (DBD ERROR: error possibly near <*> indicator at char 32 in 'select h_value from t_foo where <*>h_key = :p1') [for Statement "select h_value from t_foo where h_key = ?"] at test.pl line 23.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Oracle::db handle  at test.pl line 23.


$ perl -MV=DBI,DBD::Oracle
DBI
        /pro/lib/perl5/site_perl/5.10.1/x86_64-linux/DBI.pm: 1.613
DBD::Oracle
        /pro/lib/perl5/site_perl/5.10.1/x86_64-linux/DBD/Oracle.pm: 1.24


Oracle-client: Release 11.2.0.0.2

Oracle-server: Oracle Database 11g Enterprise Edition
               Release 11.1.0.6.0 - 64bit Production

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.