Home » Developer & Programmer » Precompilers, OCI & OCCI » How to impliment or achieve OO4O odynaset::AddNewRecord(),StartEdit(),SetFieldValue() with OCI API (Oracle 11g windows 7 C++)
How to impliment or achieve OO4O odynaset::AddNewRecord(),StartEdit(),SetFieldValue() with OCI API [message #647226] Sat, 23 January 2016 07:46 Go to previous message
Messages: 3
Registered: January 2016
Location: china shijiazhuang
Junior Member
Because Project need. I need to implement Odynaset::StartEdit() ,AddNewRecord() ,SetFieldValue() ,update() etc function which are inOO4O with OCI underlying functions,and bypass COM mechanism,Do not use COM mechanism.Our software need to hand large amounts of data in a very short period of time.It needs Very high efficiency. but I also like OO4O's simple usage ,is easy to use for most of us C++ developers.so I want to package OCI underlying functions like OO4O's Odynaset 's grammar.
I have read<< Oracle? Call Interface Programmer's Guide >>Related Sections. and ORACLE_HOME/OO4O/doc/oraclec.chm but I still do not know how to achieve/implement it.
I have done it with OCILIB by Splice select SQL Statement to get a resultRecord.and Excute another update xx set xx= xx SQL Conditional statements to accomplish "SatrtEdit" and excute OCIBindString() ect to accomplish setfieldvalue() and OCI_Excute、 OCI_Commit to accomplish ODynaset::update().and Excute one another Insert SQL statement to accomplish Odynaset::AddNewRecord(). SetfieldValue method are all use OCI_BindXXX()。But,But I read ORACLE_HOME/OO4O/doc/oraclec.chm documnet.
in oraclec.chm it indicates and explains that" Calling StartEdit informs the ODynaset that you are going to edit the values of the current record.The ODynaset attempts to obtain a lock on the record from the Oracle database so that no other user can edit the record at the same time. ".

In OO4O's Internal.Does OO4O odynaset::StartEdit() get a new ResultSet/RecordCollection by update xx set xx SQL statement? Or Does it Edit the Odynaset::Open() function's ResultSet/RecordCollection which is geted by excute select SQL statement? I also have the same question about the AddNewRecord() Method ,Does it Open up a new resultset/RecordCollection by insert into SQL statement?or Does it Edit or append the Odynaset::Open() function's resultset//RecordCollection which is getsed by excute select SQL statement?

I also note that the OCI Programmer's Guide also have OCIObjectLock() function explanation ,if it like that,how can i achieve my OCI likeOO4O but WithoutCOM.ect Package?How can I accomplish my StartEdit() AddNewRedord() .ect methods/functions?, How can I deal with these questions?
Read Message
Read Message
Read Message
Read Message
Previous Topic: ProC Reading CLOB in chunks
Next Topic: Error in Pro*C file compile
Goto Forum:

Current Time: Tue Jan 21 08:15:45 CST 2020