How do insert a Document/Image into Oracle?
Posted on 2001-08-24
I posted this on Allaire's website, and haven't gotten a response yet, maybe someone here can help...
We are using Oracle 7.3 and COLDFUSION 4.5 SP2. I am having problems trying to store MS Word docs into a LONG RAW field. I can get a them into the database if the field is LONG, after reading the file in as Binary and convert it using toBase64. I insert it into as a parameter as "cfsqltype="CF_SQL_LONGVARCHAR"". I can also insert both a Notepad documents and Images, but the problem arises when I try to get them out. The MS Word document has 'nulls', which causes an errors when I attempt to convert it back. (Only Notepad documents convert without error.) Someone suggested to store the documents as LONG RAW instead. I attempted to do that using "cfsqltype="CF_SQL_LONGVARBINARY". And am getting the error...
ODBC Error Code = 22005 (Error in assignment)
[Oracle][ODBC Oracle Driver]Error in assignment.
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (15:2) to (15:86).
I think LONG RAW is the way to go. Can anyone help?