djantzen has asked for the wisdom of the Perl Monks concerning the following question:
which according to Oracle docs means that the "ROWID contains invalid characters", a problem that occurs sometimes apparently when doing SQL updates. The environment is Solaris 2.7, Oracle 8.1.7 and DBI 1.30.DBD::Oracle::st execute failed: ORA-01465: invalid hex number (DBD ERR +OR: OCIStmtExecute)
The table structure is very simple:
Here's the test script I'm using to elicit the error:Name Null? Type ---- ----- ---- ID NOT NULL VARCHAR2(2) DATA NOT NULL BLOB
Now, it does work to translate the serialized data into hexadecimal using unpack, but this undermines the whole point of writing out to a BLOB!use strict; use warnings 'all'; use Storable qw(nfreeze, thaw); use DBD::Oracle qw(:ora_types); my $id = shift; my $thingy = 'Oh the joy' x 100; # dummy data, no effect on results my %types = (ora_types => ORA_BLOB, ora_field => 'data'); my $data = eval { Storable::nfreeze(\$thingy) }; die "$@\n$data\n" if !$data || $@ ne ''; my $insert_stmt = "insert into blobtest values ('$id', ?)"; my $sth = $dbh->prepare($insert_stmt); $sth->bind_param(1, $data, \%types); $sth->execute();
Any clues would be greatly appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: BLOBs and error ORA-01465
by panix (Monk) on Jul 26, 2002 at 00:31 UTC | |
by djantzen (Priest) on Jul 26, 2002 at 15:23 UTC | |
|
Re: BLOBs and error ORA-01465
by Ryszard (Priest) on Jul 25, 2002 at 18:11 UTC | |
by DrWhy (Chaplain) on Jul 25, 2002 at 20:23 UTC |