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.
| Author |
Topic |
|
JasonAnt
Starting Member
23 Posts |
Posted - 2007-09-07 : 23:55:58
|
| Project spec:If user is making Delivery Order for sales order, the other user cannot make Delivery order for same sales orderHow to lock a sales-order record, so other user cant use it, except for reporting (read only). I dont want to use a field since it has a lot of weakness. I am using VB6 and connect with ADOThanks |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-09-08 : 00:24:58
|
| Use sql as backend? It handles locking for you. |
 |
|
|
JasonAnt
Starting Member
23 Posts |
Posted - 2007-09-08 : 00:37:45
|
| Thank for replying rmiao, maybe if describe the process flow more clearly you can understand what I wantHeaderTable: OrderId: 001Customer, date, etcDetailTable:OrderId:001Item: PencilOrderQty: 100OutstandingQty: 80Process logic for delivery orderChoose SalesOrderID, get Item and outstandingQty, input delivery Qtyat this moment, max quantity of pencils is 80 pcs but if at the same moment other user use the same OrderId,he can input max 80 pcs of pencils tooHow to protect this, I can do validation before save the transaction, but its not what they wantI am using SQL server 2000 |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-09-08 : 01:03:35
|
| You may use proper isolation level for that, check books online for details. |
 |
|
|
|
|
|
|
|