Home » Developer & Programmer » Forms » how control the sequence in forms
how control the sequence in forms [message #201201] Fri, 03 November 2006 00:48 Go to next message
sanjeevapps
Messages: 2
Registered: July 2006
Location: Hyderabad
Junior Member
hi all,
i have id column in the form which has to generate the sequence number automatically,i have created the sequence in the database and assigned it and is working fine.
But the problem is that either we save the record or not the sequence is generating.so the as soon as we get in to insert mode the number is generated.
i need the sequence to be generated only when i save the record.
can anyone could help out with the situation.

thanks,

sanjeev varma.s.
Re: how control the sequence in forms [message #201209 is a reply to message #201201] Fri, 03 November 2006 01:35 Go to previous messageGo to next message
fakhar55
Messages: 99
Registered: September 2005
Location: UAE
Member
Assign the sequence value to column in "On Commit" Trigger. i.e

column:=SeqName.NextVal;
Re: how control the sequence in forms [message #201545 is a reply to message #201209] Sun, 05 November 2006 17:12 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I would recommend using the 'pre-insert' as the 'on-commit' will fire when you do updates as well as the inserts.

David
Re: how control the sequence in forms [message #201666 is a reply to message #201545] Mon, 06 November 2006 05:04 Go to previous message
sanjeevapps
Messages: 2
Registered: July 2006
Location: Hyderabad
Junior Member
hi Martin,
your right,the validation as worked on pre-insert trigger.
but with some errors as per my requirement, are not working on the pre-insert.so i have resolved it using post-insert trigger.
any ways thank you for ur valuable suggestion.

lets keep the rapo going

thanks,
sanjeev varma.s
Previous Topic: code to get output in pdf format
Next Topic: D2kutil
Goto Forum:
  


Current Time: Fri Sep 20 13:42:55 CDT 2024