http://qs321.pair.com?node_id=1160004

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 (Canon) 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 (Saint) 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).