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

Database and Auto Numbers

Status
Not open for further replies.

JoeM6

Programmer
Aug 5, 2000
53
US
If i have a database, and have a field that has an auto number, will that increase when i add records using a form online?

JoeM6
JPMJR11@aol.com
 
yes.
i use ms-sql. many tables have a 'identity' field (= auto-num). You must use an INSERT INTO with a fieldlist. In this fieldlist you must NOT list your identity/autonum field.
With MS-SQL you can query the last identity number with a special system variable: @@IDENTITY

br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top