Returning a ref cursor from an update based on pl/sql assoc. arrays
428179Aug 23 2004 — edited Aug 24 2004Fairly new to dotnet and ODP but I have come into a situation where I'm not positive I'm following the best methodology. I am using Oracle 9.2 and the latest ODP drivers.
Basically I am trying to implement a stored procedure for updates. My select procedure returned a ref cursor, my update is going to pass all the fields to be updated back as associative arrays and then do a bulk update.
I take the datatable, copy all the values (row by row) into arrays, and then setup the parameters. This seems straight forward, I just followed the examples. The problem is that the last field is a timestamp that I use to handle concurrancy. The update in the forall statement was joining on the timestamp column. I then have a trigger that sets the timestamp to a new value. I need to pass that timestamp value back to the application and the dataset so that I can update again.
I originally coded the SProc to have the last paramenter be a IN OUT but I've come to the realization that ODP won't support array binding for the out? Is that correct?
Is the correct technique to do another select against the data just updated and return a ref cursor as a new parameter?
Is there a way to convert an assoc. array into a cursor? I was using the return bulk collect in the forall statement to get the new timestamp values.
thx
jack