|
 |
asp_databases thread: recommendation locking records
Message #1 by 2fourt@h... on Wed, 13 Dec 2000 20:51:26 -0000
|
|
I working ona multi user system. I would like to lock recordes in my MSSql
database to prevent multiple users editing the same record. can any one
give me some suggestions.
Thank you
T
---
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS? Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development,
Web Development, Networking & Communications, and Hardware & Systems.
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 14 Dec 2000 12:25:17 +1100
|
|
adLockPessimistic, when you go to update the record - stops concurrent
access to the record.
If you retrieve a record to display in a webpage for users to edit, and
you're afraid two people could pull the same record, edit it on their
webpages, and then both press submit, one after the other, then you need
something more elaborate - eg OTOH you could use date stamps.
When you update the record insert a date stamp. When editing the record,
extract the date stamp and pass it as a hidden variable. When inserting the
record, compare the date stamp passed with the one in the database. If they
are the same, no one has updated the database, so do you're insert. If it
has changed, pull the new data out of the database, and tell the user that
the underlying data has changed...
Cheers
Ken
----- Original Message -----
From: <2fourt@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Thursday, December 14, 2000 7:51 AM
Subject: [asp_databases] recommendation locking records
> I working ona multi user system. I would like to lock recordes in my MSSql
> database to prevent multiple users editing the same record. can any one
> give me some suggestions.
>
>
> Thank you
> T
---
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS? Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development,
Web Development, Networking & Communications, and Hardware & Systems.
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #3 by "Dallas Martin" <dmartin@z...> on Wed, 13 Dec 2000 20:31:54 -0500
|
|
Quoting SQL Books On Line:
"Although Microsoft® SQL ServerT implements locking automatically, it is
possible to customize locking in applications by:
Handling deadlocks and setting the deadlock priority.
Handling time-outs and setting the lock time-out duration.
Setting the transaction isolation level.
Using table-level locking hints with the SELECT, INSERT, UPDATE, and DELETE
statements.
Configuring the locking granularity for an index. "
Locking is complex. Use a timestamp field and the tsequal() function in your
update statements.
hth,
Dallas Martin
----- Original Message -----
From: <2fourt@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, December 13, 2000 3:51 PM
Subject: [asp_databases] recommendation locking records
> I working ona multi user system. I would like to lock recordes in my MSSql
> database to prevent multiple users editing the same record. can any one
> give me some suggestions.
>
>
> Thank you
> T
>
---
FREE WEB DEVELOPMENT CODE, CONTENT, AND INSIGHTS
IN YOUR INBOX!
Get the latest and best HTML, XML, and JavaScript tips, tools, and
developments from the experts. Sign up for one or more of EarthWeb's
FREE IT newsletters at http://www.earthweb.com today!
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
|
|
 |