Re: Using native DB Sequence nos. in Insert(post)?


2004-04-01 02:23:36 PM
jbuilder10
what about writing a trigger in Oracle pl/sql like:
CREATE OR REPLACE TRIGGER MYTRIG BEFORE INSERT ON MyTable
FOR EACH ROW
BEGIN
SELECT MY_SEQ.NEXTVAL INTO :NEW.MYID FROM DUAL;
end;
and do nothing in java, just saveChanges().
Olaf Raether
On 25 Mar 2004 11:51:08 -0800, XXXX@XXXXX.COM (Garrett Snider)
wrote:
Quote
So using DataExpress components, how would you set up the use database
generated sequence numbers when inserting a new element? Do you have
to write a custom Resolver (assuming you don't need the seq#
..before.. the inset)? Or is there a fancy column property to set
somewhere?

Misc. background info:
jbX, stock from install, Oracle db

Cheers and thanks for any pointers.