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 next message
BugYang
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?
How to impliment or achieve OO4O odynaset::AddNewRecord(),StartEdit(),SetFieldValue() with OCI API [message #647227 is a reply to message #647226] Sat, 23 January 2016 07:56 Go to previous messageGo to next message
BugYang
Messages: 3
Registered: January 2016
Location: china shijiazhuang
Junior Member
How to impliment or achieve OO4O odynaset::AddNewRecord(),StartEdit(),SetFieldValue() with OCI API?

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?
Re: How to impliment or achieve OO4O odynaset::AddNewRecord(),StartEdit(),SetFieldValue() with OCI API [message #647228 is a reply to message #647227] Sat, 23 January 2016 08:59 Go to previous messageGo to next message
BlackSwan
Messages: 25752
Registered: January 2009
Location: SoCal
Senior Member
do NOT cross/multi-post

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read


Re: How to impliment or achieve OO4O odynaset::AddNewRecord(),StartEdit(),SetFieldValue() with OCI API [message #647289 is a reply to message #647228] Mon, 25 January 2016 07:25 Go to previous message
BugYang
Messages: 3
Registered: January 2016
Location: china shijiazhuang
Junior Member
Sorry ,because I have Thought that the question I don't understand have both OCI knowledge and OO4O knowledge so.. can you give me a hand on this questions?
Tks so much.
Previous Topic: ProC Reading CLOB in chunks
Next Topic: Error in Pro*C file compile
Goto Forum:
  


Current Time: Mon Dec 18 13:44:43 CST 2017

Total time taken to generate the page: 0.03151 seconds