Home » Developer & Programmer » Precompilers, OCI & OCCI » OCI, returning into. (Oracle / Windows)
OCI, returning into. [message #320191] Wed, 14 May 2008 04:54
RobinLupe
Messages: 1
Registered: May 2008
Junior Member
Hi,

I tried to do a bulk insert statement returning the Ids :

"insert into Toto (Toto_id, Toto_value) values (seq_toto.nextval, :value) RETURNING Toto_id into :id;"


In debug mode, I can retrieve the inserted ids using a OCIBindByName with OCI_DEFAULT parameter :

I insert 100 row, and I retrieve in my :id variable the 100 ids.

But in release mode, the buffer (:id) returned is corrupted.

I readed on the documentation that in fact, using "returning into" require to use OCIBindByName whith OCI_DATA_AT_EXEC parameter and OCIBindDynamic calls.

The question is : why in debug mode all is working well, and why have I to use dynamic bind when I know the buffer size needed (100 * sizeof(ID)) ?


Thanks in advance for your answer.



Previous Topic: installing Pro*C
Next Topic: Pro*C - Table or view doesn't exist error...
Goto Forum:
  


Current Time: Wed Dec 07 22:29:11 CST 2016

Total time taken to generate the page: 0.12131 seconds