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 ^^*