Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 faking out autonumbering

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-13 : 22:08:45
Ryan writes "I recently started working on a project for a conversion at work. It involves a change made by a vendor to the data structure. In the old version, the primary key was an autonumber, in the new version it isnt. In the new version, we have a "NextID" table, that we have to select from to get the next available id, increment it by one, update the table, then use the incremented value as the id for a new record in another table. This may seem elementary, but I'm looking for an sql string that will do this and return the new id number to an app in VC++. I was directed to avoid the use of a stored procedure."
   

- Advertisement -