Wednesday, August 22, 2007 4:40 AM
I'm working on a file-upload component on my current project, saving the file to an Oracle database. I've got it working, testing it out, things are going just SPLENDID.
Then out of nowhere I get this error:
ORA-01460: unimplemented or unreasonable conversion requested.
Odd...even odder that if I upload one image file things are fine, but if I upload another one it craps out.
It turns out that Oracle stored procedures have a size limit of 32k! What does that mean? Well, it means that you can't upload a BLOB value (like a file) through a stored procedure in Oracle unless you're dealing with really small files OR you want to write some custom parsing code that will break up a binary array into little chunks and loop through subsets appending it to the database field as you go.
Most of the solutions I've found online suggest to save your non-BLOB code through the stored proc, and then use straight SQL to save the BLOB...because straight SQL will work...but a stored proc won't.
Does that not seem inherintly stupid to anyone else?!
D