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

get a unique maximum field value

Status
Not open for further replies.

nnmmss72

Programmer
May 14, 2006
110
IR
i want to get the maximum of a integer field. how can i be sure that i will get the a unique maximum number. i mean if 2 users simultanously call the method , how can i be sure to get the unique maximum number
 
You can't. Is this being used for an ID column in a table as a unique key? If so, and you are using SQL Server, use an identity column for your key.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top