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

Home -> Community -> Usenet -> c.d.o.misc -> LONG RAW type and ODBC within Visual C++ 6

LONG RAW type and ODBC within Visual C++ 6

From: Philippe CASTELLA <philippe.castella_at_free.fr>
Date: Tue, 16 Dec 2003 12:38:46 +0100
Message-ID: <brmqjs$6m6$1@s1.read.news.oleane.net>


Hi,

I am new in this forum and maybe someone has allready answered this question... but if someone can help me...

I need to store binary files (variable sizes) in an Oracle Database (from 7.3 to 9i). So I use a long raw data type (Blob does not exist in 7.3).

My problem is easy :

    How can I do this using ODBC within Visual C++ ?

I tried editing a Derived Class from MFC CRecordset but when I do that, I receive this message :

                    ORA-03127: no new operations allowed until the active
operation ends

whereas no operation was made before.

The code Was :

     CGXDynamicRecordset TmpReq(m_ReqUpd);
     TmpReq.SetSqlQuery("select ID, FILE from TMP_FILE where ID = 1");
     TmpReq.Open();    --> the problem happens here
     TmpReq.MoveFirst();
     TmpReq.Edit();
     TmpReq.SetFieldData(1,  << the data >>, &csErr);
     TmpReq.SetFieldDirty(NULL);
     TmpReq.Update();

ID is the unique key of TMP_FILE and FILE is a long raw data type.

m_reqUpd is a pointer to my CDatabase Object CGXDynamixRecordset is a CRecordset derived class wich allow executing requests in an easyest way than with CRecordset

It works well if I use a long data type instead of long raw. So how can I do with long raw ?

Thanks for all help

Regards,

Philippe CASTELLA Received on Tue Dec 16 2003 - 05:38:46 CST

Original text of this message

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