lykmyk
Dec 12 2011, 04:30 PM
My application reads a binary file in C++ using fstream.read and needs to save that binary data into the database as a blob.
I am not using OCI.
My struggle is trying to determine the proper way to pass this unstructured data to a PLSQL procedure.
1 > What data type should the input paramter be for the PLSQL procedure?
2 > My binary data is in a char variable. Do I need to convert that to something else before passing it as a parameter.
Thank You.
burleson
Dec 12 2011, 05:52 PM
This is a DBA forum, but I took C in college (80 years ago!)
>> save that binary data into the database as a blob.
OK, you have a char** pointer to an aray of pointers, yes?
Then see here, how to write the data in binary stream into Oracle.
http://www.dba-oracle.com/t_insert_image_blob_client_pc.htmOracle also has a dbms_lob package for this:
http://www.dba-oracle.com/t_dbms_lob.htmGood Luck!
lykmyk
Dec 12 2011, 07:19 PM
Thank you very much sir for dusting off the old C hat and providing a response; this was very helpful.
burleson
Dec 13 2011, 08:53 AM
Hi,
>> this was very helpful.
Great!
If you would please post the solution, for the benefit of future readers . . .