Solved

How to read BLOB data from Oracle and save as a file

Posted on 2004-10-04
5
986 Views
Last Modified: 2007-12-19
I am writing a script using Perl 5.6.1 and the DBI module to read data out of a table created by another program and create an IBM Rational ClearQuest record.  I will be using the ClearQuest API to create the record.  Some of the rows in the table I am reading contain BLOB data which where attachments added by the user of the other system.  In order to get the attachment into the ClearQuest database using its API, I have to reconstruct the BLOB data into a file on the file system.  Please send me some code samples that would show me how to read the BLOB data and save it to the file system in its original format (Word, Zip, XML, Text, etc...).
0
Comment
Question by:curmudjim72
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Author Comment

by:curmudjim72
ID: 12221478
The BLOB data I need to extract is in an Oracle 8.1.7 database.  I am using Windows 2K.
0
 

Author Comment

by:curmudjim72
ID: 12221534
The table I am reading, which contains the BLOB data, also has columns which contain the type and format of the BLOB data (application/msword and Long Text) for example.
0
 
LVL 12

Expert Comment

by:geotiger
ID: 12223118
0
 

Author Comment

by:curmudjim72
ID: 12226765
Thanks for the examples, but can this not be accomplished using perl?
0
 
LVL 8

Accepted Solution

by:
inq123 earned 500 total points
ID: 12229629
Hi curmudjim72,

A quick google search turns up:

http://coding.derkeiler.com/Archive/Perl/perl.dbi.users/2004-02/0278.html (perl answer to a question almost exactly like yours)
and this one's good too, a module and example:
http://www.cpan.org/modules/by-module/DBIx/DBIx-BLOB-Handle-0.2.readme

Cheers!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how do I grep for a specfic DNS record in a directory 3 54
PERL variable conundrum 9 97
Formatting stings with pack and printf in perl 5 84
Export Variables in Perl 3 123
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question