I'm experienced with SQL server 7 and Access, but not with Oracle, and I need to do some maintenance on an Oracle 8i server. I stumbled across a problem:
A particular table has an insert trigger so that new ID's are being generated by a sequence at insert. However, after insert, that key cannot be obtained in ADO.
The second last statement (lngNewKey = ..) does not fail but only returns an empty value. I need that value!
I'm wondering if there are ways to solve this problem. But please: if possible, without any database changes!
Help me, please.. Bye,
Rob.
A particular table has an insert trigger so that new ID's are being generated by a sequence at insert. However, after insert, that key cannot be obtained in ADO.
Code:
oRecordset.Open "tblUser", oConnection
oRecordset.AddNew
oRecordset.Fields("sName") = strMyName
oRecordset.Update
lngNewKey = oRecordset.Fields("lUserID") '<-- fails!
oRecordset.Close
The second last statement (lngNewKey = ..) does not fail but only returns an empty value. I need that value!
I'm wondering if there are ways to solve this problem. But please: if possible, without any database changes!
Help me, please.. Bye,
Rob.