Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SEQUENCE VALUES 1

Status
Not open for further replies.

tyb

Technical User
Feb 10, 2004
137
0
0
IR
Dear Frends

i'm using sequence value(sequence with increment value of 1) to populate my ID field in a BLOCK, i've defined the item's initial value as
:sequence.shp_seq.nextval but each time i run the form the value is incremented by 2 instead of 1.

can some one plz let me know wut makes this value jump on to the next.

plz help
thanks
 
You should only assign the nextval on commit of your data. It is likely that by having the sequence as the initial value of the item, the sequence gets hit once for the 'default' value and again when the data is comitted.

Put the sequence in a PRE or POST-INSERT trigger.
 
Many thanks lewisp for ur suggession it solved the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top