Help - Search - Members - Calendar
Full Version: Passing Unstructured Data from Pro*C to PLSQL
Oracle DBA Forums > Oracle > Oracle Forum
lykmyk
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

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.htm

Oracle also has a dbms_lob package for this:

http://www.dba-oracle.com/t_dbms_lob.htm

Good Luck!
lykmyk
Thank you very much sir for dusting off the old C hat and providing a response; this was very helpful.
burleson
Hi,

>> this was very helpful.

Great!

If you would please post the solution, for the benefit of future readers . . .
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.