RE: Oracle and BLOBs

RE: Oracle and BLOBs

am 24.11.2005 01:28:43 von ted.behling

If I remember properly, I think I saw that error when setting up
Apache::Session::Oracle. I have my A_SESSION column set up as type
LONG. I'm running 9iR2. Hope that helps.

Ted Behling

-----Original Message-----
From: Ron Savage [mailto:ron@savage.net.au]=20
Sent: Wednesday, November 23, 2005 7:24 PM
To: List - DBI users
Subject: Q: Oracle and BLOBs

Hi Folks

I've written CGI::Session::Driver::oracle.pm using a_session of type
BLOB, and get the Oracle error ORA-01465: invalid hex number when the
content to be inserted in that field is output from Data::Dumper.

I've read Oracle docs and dozens of questions on AskTom, but nothing
says that text put into a BLOB field must be hex-encoded.

Any ideas?

--
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html

RE: Oracle and BLOBs

am 24.11.2005 01:36:47 von ron

On Wed, 23 Nov 2005 19:28:43 -0500, Ted Behling wrote:

Hi Ted

> If I remember properly, I think I saw that error when setting up
> Apache::Session::Oracle. I have my A_SESSION column set up as type
> LONG. I'm running 9iR2. Hope that helps.

That worked! Ah, well. So much for trying to do the right thing...

$many x $thanx;

--
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html

RE: Oracle and BLOBs

am 24.11.2005 03:55:48 von stbaldwin

I don't know if this helps, but if you want to insert into a BLOB column,
you can by simply specifying the ora_type attribute. For example ...

use DBD::Oracle qw(:ora_types);
:
my $sth = $dbh->prepare(q(
insert into some_table (blob_col) values (:blob_data)
));
$sth->bind_param(':blob_data', $some_buff,
{ ora_type=>ORA_BLOB, ora_field=>'blob_col' });
$sth->execute;

Steve

-----Original Message-----
From: Ron Savage [mailto:ron@savage.net.au]
Sent: Thursday, 24 November 2005 11:37 AM
To: List - DBI users
Subject: RE: Oracle and BLOBs

On Wed, 23 Nov 2005 19:28:43 -0500, Ted Behling wrote:

Hi Ted

> If I remember properly, I think I saw that error when setting up
> Apache::Session::Oracle. I have my A_SESSION column set up as type
> LONG. I'm running 9iR2. Hope that helps.

That worked! Ah, well. So much for trying to do the right thing...

$many x $thanx;

--
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html