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 -> Is it possible that I can use ADO Recordset object in VC to access (store and retrieve) the LOB data with BLOB field in Oracle table?

Is it possible that I can use ADO Recordset object in VC to access (store and retrieve) the LOB data with BLOB field in Oracle table?

From: Mark Liao <markl_at_symtrontech.com>
Date: Wed, 7 Nov 2001 11:34:44 +0800
Message-ID: <9sa9nf$b1$1@news.is.net.tw>


Dear All,

    I try to use ADO Recordset to access binary array data into the Oracle table. If I setup the field into "Long Raw" datatype, the program works fine. I can use ADO Recordset and Filed objects to get and set the binary array from the Oracle table. However, if I setup the field into "BLOB" datatype, the original source code can not work.

    I also test the sample code which download from the OTN (Oracle Technology Network). That program used ADO Command and Parameter objects to access the binary data and call stored procedure to set/get binary array data with BLOB field.

    So, my question is "Is it possible that I can use ADO Recordset to access binary array data with BLOB field without calling any stored procedure?". And the source code probably will be such like below :

/* source code for adding Binary array into Oracle table */

BYTE BinaryImage[1024]; // binary array

VARIANT vValue; // variant parameter

BinaryArrayToVariant(BinaryImage,vValue); // transfer binary array to variant

pRecordset->Fields->GetItem("BinaryData")->Value=vValue; // add binary data to BLOB field

VariantClear(&vValue);

PS. The Oracle system I used is Oracle 9i.

Mark Liao ^^* Received on Tue Nov 06 2001 - 21:34:44 CST

Original text of this message

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