` Printed Icetips Article

Icetips Article



Par2: Autonumber in Oracle
1999-11-01 -- Andy Stapleton
 
You cannot get a nextval using CW unless you hand code all add statements.
While that being a real pain in the butt, you can use a different method or
to get the job done.

1) method 1, write some code that does a
            TableName{Prop:SQL}='Insert into
'&NAME(TableName)&'(Autoincfield) Values(Autoinc.Nextval)
            TableName{Prop:SQL}='Select   * from '&NAME(TableName) where
autoincfield = Autoinc.CurrVal


place those in where the Autoinc clarion code is.....

or the easier method,

    Create a insert trigger on the table, and autoincrement manually (don't
use the nextval thing) .



Printed November 21, 2024, 6:55 am
This article has been viewed/printed 35317 times.