Andy,
You're so correct! It's not a blob type. I should have checked. Thank you very much for catching this one.
Regards,
Jie
Andy Hassall wrote:
Are you sure it's a BLOB?
I notice you're fetching the payload from a queue table; could this queue table have been set up with an object type? DBD::Oracle 1.15 here has no problem selecting from a RAW queue, i.e. with a BLOB user_data column, but fails for an object type as DBD::Oracle doesn't support objects.
e.g.
SQL> create or replace type qobj as object (widget varchar2(10), sprocket varchar2(10));
Type created
SQL> exec dbms_aqadm.create_queue_table(queue_table => 'QTAB1', queue_payload_type => 'RAW');
PL/SQL procedure successfully completed
SQL> exec dbms_aqadm.create_queue_table(queue_table => 'QTAB2', queue_payload_type => 'QOBJ');
PL/SQL procedure successfully completed
#!/usr/bin/perl use strict; use warnings; use DBI;
my $dbh = DBI->connect('dbi:Oracle:dev92', 'test', 'test', { AutoCommit => 0, RaiseError => 1, }) or die DBI::errstr;
for (1..2) { my $sql = "select user_data from qtab$_"; print "Preparing `$sql`\n";
my $sth = $dbh->prepare("select user_data from qtab$_"); $sth->execute;
print "OK\n"; }
$dbh->disconnect;
__END__
[EMAIL PROTECTED] andyh]$ ./qtab.pl Preparing `select user_data from qtab1`
OK
Preparing `select user_data from qtab2`
Field 1 has an Oracle type (108) which is not explicitly supported at
/usr/lib/perl5/site_perl/5.8.3/i686-linux/DBD/Oracle.pm line 321.
DBD::Oracle::db prepare failed: ERROR OCIDefineObject call needed but not
implemented yet [for Statement "select user_data from qtab2"] at ./qtab.pl
line 17.
DBD::Oracle::db prepare failed: ERROR OCIDefineObject call needed but not
implemented yet [for Statement "select user_data from qtab2"] at ./qtab.pl
line 17.
Issuing rollback() for database handle being DESTROY'd without explicit
disconnect().
