Retrieving BLOBs from Oracle using DBI 
Author Message
 Retrieving BLOBs from Oracle using DBI

I'm having trouble fetching a BLOB value in Oracle using DBI.   The
following code does not go into the fetch loop....when I select a BLOB
column.  Any other column and it works fine.

        $stmt = $db->prepare("select blob_fld from sometable where key
= 101") || die "\nPrepare error: $DBI::err .... $DBI::errstr\n";

        $stmt->execute() || die "\nExecute error: $DBI::err ....

        $row = 0;
        while ($blob = $stmt->fetchrow)

                printf STDERR "Fetching row %d \n", $row++;
                print STDOUT $blob;


        if (!$row)
                print STDERR "No data found.\n";
                print STDERR "Complete.\n";

Ron Boggs
Trade Harbor, Inc.
St. Louis, MO

Sent via http://www.*-*-*.com/
Before you buy.

Wed, 18 Jun 1902 08:00:00 GMT  
 Retrieving BLOBs from Oracle using DBI


>    while ($blob = $stmt->fetchrow)

Where's your error handling for the fetchrow? Why not just turn
RaiseError on?

Wed, 18 Jun 1902 08:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. DBI/Oracle: Retrieving lowercase field names from Oracle using fetchrow_hashref

2. can't retrieve data from Oracle DB using DBI and DBD

3. DBI/DBD::Informix and retrieving BLOB data

4. Select BLOB In Oracle with DBI

5. Storing binary files into BLOBs through DBI::Oracle

6. DBI - Writing blobs - blob types

7. How can I insert blob data using DBI?

8. Perl DBI and Oracle - How to retrieve Long Values

9. Problem viewing data retrieved using PERL script on ORACLE database

10. DBI - how to insert and retrieve BLOBs in Oracle 8i?

11. SYBPERL: retrieving and parsing BLOBs

12. how to copy values from a file into a oracle-table using DBI


Powered by phpBB® Forum Software