Oracle-OCI-0.02.tar.gz (was: ANNOUNCE: DBD::Oracle 1.07)
[email protected] (Tim Bunce) Wed, 6 Jun 2001 03:01:06 +0100
| Newsgroups | perl.dbi.oracle-oci |
|---|---|
| Organization | Paul Ingram Group, Software Systems, +44 1 483 862800 |
| Message-ID | <[email protected]> |
On Wed, Jun 06, 2001 at 02:12:22AM +0100, Tim Bunce wrote:
> After almost a year...
>
> file: $CPAN/authors/id/T/TI/TIMB/DBD-Oracle-1.07.tar.gz
> size: 159853 bytes
> md5: 8f09afc63db67ce3e252c31b84556168
You'll need this for the Oracle::OCI release:
file: $CPAN/authors/id/T/TI/TIMB/Oracle-OCI-0.02.tar.gz
I've uploaded it to pause.perl.org but it's not been processed yet.
You can get it from here:
ftp://pause.perl.org/pub/PAUSE/authors/id/TIMB/Oracle-OCI-0.02.tar.gz
This release features integration with DBI & DBD::Oracle.
You can now do things like:
# first some standard DBI stuff:
my $dbh = DBI->connect('dbi:Oracle:', $user, $pass);
my $table = 'oracle_oci_test__drop_me';
my $create_table = qq{create table $table ( idx integer, lng CLOB )};
$dbh->do($create_table);
$dbh->do("insert into $table values (?, ?)", undef, 1, "BLOB");
# test ability to use DBI/DBD::Oracle handle
# Note in this case we use both explicit and implicit conversion
OCIAttrGet(get_oci_handle($dbh, OCI_HTYPE_ENV),
$cache_max_size, 0, OCI_ATTR_CACHE_MAX_SIZE, $dbh);
warn "OCI_ATTR_CACHE_MAX_SIZE='$cache_max_size' from DBD::Oracle\n";
# now we fetch the LOB's 'locator' instead of the LOB contents
# by turning off the ora_auto_lob attribute
my $lob_locator = $dbh->selectrow_array(qq{
select lng from $table for update
}, { ora_auto_lob=>0 });
# and now we can use the OCILob*() functions on the locator:
OCILobGetLength($dbh, $dbh, $lob_locator, my $lob_len=0);
warn "OCILobGetLength=$lob_len";
OCILobTrim($dbh, $dbh, $lob_locator, 2);
OCILobGetLength($dbh, $dbh, $lob_locator, $lob_len=0);
warn "OCILobGetLength=$lob_len";
I only have a couple of days left before I'm flying off to the Database
Discovery conference where I'll be talking about this module. I'd love
to have some feedback by then so if you can spare some time to play
with this ASAP I'd be grateful.
Thanks!
Tim.
p.s. Ignore the Makefile.PL, just run 'perl boot' and sit back... :)
p.p.s. to save you waiting for DBD-Oracle to be mirrored to your
local CPAN, you can get that from here:
ftp://pause.perl.org/pub/PAUSE/authors/id/TIMB/DBD-Oracle-1.07.tar.gz