Solved

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

Posted on 2004-10-04
5
1,024 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
 

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
Six Sigma Control Plans

617 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