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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting an Identity column

Status
Not open for further replies.

TonCoronel

Programmer
Dec 1, 2003
37
NL
I am having trouble selecting an Identity column

I have a window called employee_detail (its shows details of a selected employee)and there is a button on it called add new employee. when it is pressed it opens a new window where I can add a new employee when I save it, it has to go back to the window: employee_detail and show the employee I just filled in. I use a retrievel argument on the Identity column but it doesnt work when I ad a new employee.
li_employeeID = dw_addemployee.GetItemNumber(li_row,"employee_ID")

is there another way to get an Identity column?
 
Are you attempting to get the employee_id prior to it being saved to the database? Have you refreshed your datawindow? There is nothing special that you need to do to obtain an identity column.
 
No after I save it I want to get the employee_ID so I can use it for the openwithparm() function.

How do I refresh my datawindow??? and what does that do?
 
You need select @@identity from any table.
Let it few rows...
The server give the last identity.
( select @@identity into :id from anytablename )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top