473,388 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Record Locking

Hello:

I have a question regarding Record Locking in ASP...If the user x's out of
the web page, how can I unlock the record? A co-worker told me it has to be
done in Javascript, but he doesn't know how to write the javascript and I
don't know Javascript.

The records are locked in the database simply by making a boolean field
equal to true. If the value of that field for the record you are querying
equals false, you can edit it. If it is equal to true, you will not be
allowed to run the update....So, basically, I need to run javascript code on
close that changes the value of that field to false.

Any help would be greatly appreciated. I am new at ASP.net and don't know
javascript. So, if you can give an example, that would be excellent.

Thank you,

Justin
Jul 21 '05 #1
1 1715
CT
Justin,

I think what you're trying to do here is dangerous. The idea is good, but
what happens with broken connections; you will locked records that will
never unlock. How do you know when to clean-up and unlock records that
shouldn't be locked?

You might want to consider a different approach and use a different locking
scheme, or possibly use optimistic concurrency which is the general to go
with disconnected data access.

Form your post I see you refer to ASP and not ASP.NET, so I'm not sure which
you're using. If ASP, you might want to consult a different newsgroup.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105

"Justin" <Ju****@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
Hello:

I have a question regarding Record Locking in ASP...If the user x's out of
the web page, how can I unlock the record? A co-worker told me it has to
be
done in Javascript, but he doesn't know how to write the javascript and I
don't know Javascript.

The records are locked in the database simply by making a boolean field
equal to true. If the value of that field for the record you are querying
equals false, you can edit it. If it is equal to true, you will not be
allowed to run the update....So, basically, I need to run javascript code
on
close that changes the value of that field to false.

Any help would be greatly appreciated. I am new at ASP.net and don't know
javascript. So, if you can give an example, that would be excellent.

Thank you,

Justin

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Fardude | last post by:
ACCESS 97, Pessimistic Record Locking!??? Does Access 97 allow record level Pessimistic locking? In other words, when user A is editing a record (has it locked) and User B tries to edit it...
0
by: Megan | last post by:
Hi- I have a question about the Microsoft Access Record-Locking Information Icon. Whenever I, or my friends, open my MS Access database, the Microsoft Access Record-Locking Information Icon...
0
by: ethanj /personal/ | last post by:
We are using Access 2000 database, with the following settings. Tool > Options > Advance > Default Record Locking = Edited Record Open databases using record level locking = True Form...
1
by: jv | last post by:
Hello, I'm using A2K and am trying to make sure that my program only locks one record at a time and I don't seem to have any luck getting that to happen. In the database options, I've selected...
1
by: wheel | last post by:
I have been ok with optimistic locking most of the time but I have a situation now where there is more of a chance that users could try to edit a record at the same time. I'd like to use pessimitic...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
9
by: master | last post by:
Actually, it is not only the record locking, what I need, and nobody seems to descibe this. Imagine the following scenario. There is a database with, say 10000 records with some unvalidated...
0
by: Cindy Huyser | last post by:
I have an Access 2000 database behind a threaded Java application that that can have have concurrent access to the same table (but not the same record). The database is set up for shared access...
1
by: Paul H | last post by:
I have an Employees table with the following fields: EmployeeID SupervisorID Fred Bob Bob John Bob Mary Bill Bill I have created a self join in...
19
by: emanning | last post by:
Using Access 2003 and using a form that's mostly bound. I need a way to tell if user-1 is on the record when user-2 tries to open the same record, w/o waiting for the user-1 to save the record...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.