Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> JDBC-like PreparedStatement.setBinaryStream in C++ via OCI ??
Hi there,
i have to implement a JDBC like interface to Oracle from C++ using OCI. When trying to implement PreparedStatement.setBinaryStream or similar LOB functionality, I find the following porblem:
(1) When firing INSERT or UPDATE statements with LOB columns I have to use
EMPTY_BLOB() first and then select the LOB to be allowed to do
OCILobWrite().
(2) I cant really come up with a SELECT command fetching exactly the
inserted LOB because I dont really know about the syntactical SQL structure
of the command that is behind the current PreparedStatement object... and I
dont fancy writing a parser.
So how do I go about that if someone sends a command like "INSERT INTO Some_table VALUES (?, ?)" where 1st ? is a number, 2nd ? is a LOB and binds 1st ? to an int and 2nd ? to a binary stream ? I can get an EMPTY_BLOB() in but the how do I feed the binary stream ? I have no valid LOBLocator* and no clue how to get one... :(
Thanks in advance,
André
:O
Received on Thu Jan 17 2002 - 10:04:55 CST
![]() |
![]() |