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
Solved

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

Posted on 2004-10-04
5
943 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…

828 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