Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Retrieving Office 2007 files from a BLOB using Perl

by Corion (Patriarch)
on Mar 10, 2010 at 19:28 UTC ( #827874=note: print w/replies, xml ) Need Help??


in reply to Retrieving Office 2007 files from a BLOB using Perl

Maybe you would fare better if you used DBI placeholders instead of interpolating your data into your SQL? I think that a carefully crafted filename could still subvert your SQL, because you don't escape/remove newlines and other binary data from it.

Also, maybe you need to use binmode when reading your file, but I don't know that much about Oracle. Also, why are you using such a low chunk size of 4096 instead of a chunk size that would fetch most of your documents in one go?

  • Comment on Re: Retrieving Office 2007 files from a BLOB using Perl

Replies are listed 'Best First'.
Re^2: Retrieving Office 2007 files from a BLOB using Perl
by Stegalex (Chaplain) on Mar 10, 2010 at 20:00 UTC
    Thanks for your remarks. I have increased the chunk size and am doing a binmode with the same results. Not sure how placeholders would impact my results as the ora_lob_append is feeding chunks to the tuple instead of trying to write the entire contents to the file then the tuple all in one shot.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://827874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2023-01-30 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?