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.
|
|
|