Home » Developer & Programmer » Forms » How can I use SEQUENCES in the Forms.
How can I use SEQUENCES in the Forms. [message #84183] Tue, 10 February 2004 21:40 Go to next message
Bvphl
Messages: 8
Registered: June 2003
Junior Member
Hi Friends

Can u give me the guidence and solutions for the following Please..........

Eg: I created a tabale 'Employee' with columns(EmpNo, EmpName, Address, .....) and the SEQUENCE EMPNO_SEQ INCREMENTED BY 1; through SQL.

Then I created the Form thuroug Developer(Form Designer 4.5) for the table Employee.  I entered all the values into the form except the EMPNO, in which I am trying to genetate the EmpNo automatically by using the Sequence EMPNO_SEQ.  Here, how can I insert a new record through the form by using the sequence to increment the EmpNos one by one into the database.

Thank You

 
Re: How can I use SEQUENCES in the Forms. [message #84208 is a reply to message #84183] Sat, 14 February 2004 02:27 Go to previous message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
In the Pre-Insert Trigger of the Emp block write this.
Select Emp_Seq.nextval into :Empno from dual ;
Previous Topic: Forms connecting to Sybase DB
Next Topic: animation
Goto Forum:
  


Current Time: Thu Apr 25 16:21:18 CDT 2024