Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> JDBC-like PreparedStatement.setBinaryStream in C++ via OCI ??

JDBC-like PreparedStatement.setBinaryStream in C++ via OCI ??

From: André Hartmann <andrehartmann_at_hotmail.com>
Date: Thu, 17 Jan 2002 17:04:55 +0100
Message-ID: <a26sn8$riv$1@crusher.de.colt.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US