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

Autoincrement IDs

Status
Not open for further replies.

TylerG

Programmer
Jan 5, 2000
16
CA
I am using a Visual FoxPro frontend with SQL Server and I want to know how to autoincrement a field in an SQL table. I tried to create a trigger on insert but don't know the syntax to accomplish this. Any help would be appreciated.

TIA,
Tyler
 
Autoincriments are known as IDENTITY columns in SQL server. Simply use the EM to edit the table and put a tick in the IDENTITY box.
 
That works but I'm having troubles displaying that change on the FoxPro end. It doesn't show me the new ID till I exit and then re-enter the form. Any ideas how to fix this?

Tyler
 
You need to requery the remote view, or if you are only need to update that one record lok at the refresh() function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top