Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Need code to save Blob into a file

by rajkumarpandit (Initiate)
on Apr 09, 2016 at 15:46 UTC ( #1160004=perlquestion: print w/replies, xml ) Need Help??

rajkumarpandit has asked for the wisdom of the Perl Monks concerning the following question:

Searched a lot but couldn't find a correct example of downloading a pdf file from oracle db, stored in blob column, and saving it locally ( unix machine, where I run perl code)

thanks in advance for providing code or giving me a link. regards, raj

Replies are listed 'Best First'.
Re: Need code to save Blob into a file
by 1nickt (Abbot) on Apr 09, 2016 at 16:05 UTC

    Hi raj,

    What have you tried so far? How does it fail for you?

    See How do I post a question effectively?.

    You should be able to fetch an item from your database using the DBI and DBD::Oracle.

    You may want to pay particular attention to the LongReadLen attribute when using them.

    Hope this helps!

    The way forward always starts with a minimal test.
Re: Need code to save Blob into a file
by LanX (Cardinal) on Apr 09, 2016 at 15:53 UTC
    Well it depends ...

    Probably you just need to read binmode

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

    ) for instance if it was already stored properly.

Re: Need code to save Blob into a file
by graff (Chancellor) on Apr 09, 2016 at 22:20 UTC
    Did you try using the Super Search link here at the monastery, and looking for the word "blob"? I got this node on the second page of results. I expect there are probably more (in case that one doesn't have enough info for you).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1160004]
Approved by 1nickt
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2021-04-14 15:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found