I am using ActiveState Perl Version v5.6.1 for MSWin32-x86 on my 2000 box.
The dbd was downloaded from active state also. 
When I vi the Oracle.pm it says Version = 1.06

I am running the Oracle 8i tools on my PC.

Where should I go from here?

Thanks
Scott


-----Original Message-----
From: David N Murray [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 3:00 PM
To: Scott Purcell
Cc: [EMAIL PROTECTED]
Subject: Re: blob error need help


My silly, off-the-cuff guess is that you need DBD built using OCI8
libraries.  Did you build DBD yourself, or download a package?  Can you
build it yourself (perl Makefile.PL; make; make test; make install)?  If
you are using Oracle 8, then you have the right libraries to do the build.
It looks like the error is saying that Oracle7 didn't support BLOBs.

HTH,
Dave

 On Feb 17, Scott Purcell scribed:

> Hello,
>
> I have some (jpeg) blobs in oracle.
>
> table looks like this:
> asset_id       height       width        preview
> varchar2       varchar2    varchar2    blob
>
>
> Ihave the programming DBI book here, but it does not cover this very well. I just 
>want to select a blob and write it to a file. No big deal.
>
> I have scoured the internet and found the following: But it chokes somehow? I can't 
>figure it out.
> ### error is as follows: PS we use oracle 8i.
> $ getblob
> DBD::Oracle::st execute failed: ORA-00932: inconsistent datatypes (DBD: oexfet e
> rror, e.g., can't select LOB fields using DBD::Oracle built for Oracle 7) at ./g
> etblob line 23.
>
> ###
>
> Thanks,
> Scott
>
>
> #############################################
>
>
> #! perl -w
>
> use DBI;
>
> # binding parameters to statements.
> # binding, placeholders, etc. pseudonames
>
> my $ref = {
>       PrintError => 0,
>       RaiseError => 1,
>     AutoCommit => 0};
>
> my $max_len = 2000000;
> my $dbh = DBI->connect("dbi:Oracle:xxx", "xxxxl", "xxx", $ref);
>
>
>
> $dbh->{LongReadLen} = $max_len;
>
> $sth = $dbh->prepare(qq{select preview from preview where asset_id = 'xxxxxxx'});
> $sth->execute();
> while (my $doc = $sth->fetchrow_array) {
>     open (OUT, ">foo.jpg") or die $!;
>     binmode(OUT);
>     print OUT $doc;
>     close(OUT);
> }
>
> $sth->finish;
> $dbh->disconnect;
>
>
>

Reply via email to