(Fwd) Trouble with returning BLOB
From: Tim Bunce (Tim.Bunce_at_pobox.com)
Date: 05/12/04
- Next message: Jupiterhost.Net: "Re: do() with bind_values"
- Previous message: Scott T. Hildreth: "Re: do() with bind_values"
- Next in thread: Jimmy Jauhal: "Describe table"
- Reply: Jimmy Jauhal: "Describe table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 12 May 2004 18:31:15 +0100 To: dbi-users@perl.org
----- Forwarded message from Raj Chandran <rc264@cornell.edu> -----
Delivered-To: tim.bunce@pobox.com
X-SPF-Guess: pass (seems reasonable for rc264@cornell.edu to mail through 132.236.56.21)
Subject: Trouble with returning BLOB
From: Raj Chandran <rc264@cornell.edu>
To: Tim.Bunce@pobox.com
Date: 12 May 2004 12:03:10 -0400
X-PMX-Version: 4.5.0.92886, Antispam-Core: 4.0.4.93542, Antispam-Data: 2004.5.11.100443
Hi Tim,
I have used your DBD::Oracle to write LOB in chunks and I wanted to
streamline my code a little more by combining 'insert EMPTY_BLOB'
statement and 'get locator' select query.
Please see the code below.
($id, $loc) = (1, undef);
$stmt = "INSERT INTO $TABLE VALUES (?, EMPTY_BLOB()) returning file into
?";
$sth = $dbh->prepare($stmt) or die $dbh->errstr;
$sth->bind_param(1, $id) or die $dbh->errstr;
$sth->bind_param_inout(2, \$loc, 1000, {ora_type => ORA_BLOB}) or die
$dbh->errstr;
$sth->execute or die $dbh->errstr;
print "After 2nd statement loc : $loc\n";
I am getting a Segementation Fault when I run this code.
Why am I getting this error ?
Many Thanks,
Raj
----- End forwarded message -----
- Next message: Jupiterhost.Net: "Re: do() with bind_values"
- Previous message: Scott T. Hildreth: "Re: do() with bind_values"
- Next in thread: Jimmy Jauhal: "Describe table"
- Reply: Jimmy Jauhal: "Describe table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|