I have a website adding orders to my database. These start at 10000000 and increment by 1.

I have pieces of paper sent out in advance with order numbers on them. These start at 50000000 and increment by 1.

We get batches of paper orders brought back and need to input them. The details ar't important but the point is that i need to do this...

website adds 10000123
website adds 10000124
website adds 10000125
save 10000125 as the last id

Lock the database so the website can't insert any orders.

DBCC CHECKIDENT sets to the ordernumber on the paper sheet (50001234)
insert the paper order 50001234

set the primary key back to 10000125
website adds 10000126
website adds 10000127

The problem is I don't know how to lock the database. And if the database is locked I'm not sure how the website will react.

I have no idea what to google.

10 Years
Discussion Span
Last Post by jonesc5

not a problem at the momment I only have 4 orders and they are mine. It's brand new.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.