Discussion Locked

How to lock a record

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello guys,

My problem is How to lock a record when the user updating a record, so the other user cannot open the same record while it still being updating, and now I'm using ASP for my programming language, Ms. Access or SQL Server as the database and use ADO method to Insert, update, delete or select a record.

Beside there How to disabled the F5 (function)button in IE (Internet Explorer) ?

Thank's for the time to read my problem?? Sorry.. my english is not very well And I hope some body can solve it.

5 replies

by ghousem

Here is the SQL for ROWLOCK.

UPDATE employee
SET salary = 10000
FROM employee
WITH (ROWLOCK)
WHERE start_date < '1/1/2002'

Ghouse Mohiuddin

by chennaitechie

Actually you need not manually locka record in a database when you are accessing the way you are currently doing.it is done automatically.

And to your second question, my answer would be "U Cannot do that"

by cheung_herman

thank's for comment but I still don't understand what do you mean "IT IS DONE AUTOMATICALLY" ??? and my second question it will answered by Microsoft but I don't know the Microsoft e-mail address for this question.

This discussion is closed to new replies.