Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle, PERL & blobs
Fetch with blob_read.
John
groenveld_at_acm.org
#!/usr/bin/perl -w
use strict;
use DBI;
use GD;
my $img = new GD::Image(100,100);
my $long_raw = $img->gif;
my $dbh = DBI->connect("dbi:Oracle:", "scott", "tiger",
{AutoCommit=>0, LongTruncOk=>1,PrintError=>undef}) or die "$DBI::err: $DBI::errstr\n"; my $sth = $dbh->prepare("INSERT INTO foobar VALUES (?, ?)") or die "$DBI::err: $DBI::errstr\n";$sth->bind_param(2, $long_raw, {"ora_type", 24});
$sth->bind_param(1, "1");
or die "$DBI::err: $DBI::errstr\n";
$sth->finish
or die "$DBI::err: $DBI::errstr\n";
$dbh->commit
or die "$DBI::err: $DBI::errstr\n";
$dbh->disconnect
or die "$DBI::err: $DBI::errstr\n"; Received on Thu Jun 18 1998 - 23:16:33 CDT
![]() |
![]() |