×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Prevent more user from edit in same record proplem

Prevent more user from edit in same record proplem

Prevent more user from edit in same record proplem

(OP)
suppose i need to make update the employee as following
CREATE PROC UPDATE_EMPLOYEE
(
@EmployeeID INT,
@EmployeeName NVARCHAR(50)
)
AS
update Employee set EmployeeName=@EmployeeName where EmployeeID=@EmployeeID
Suppose I have two useres A,B
A modified or edit using stored procedure above employee no 5000 field EmployeeName
B need to modify employee no 5000 using stored procedure above field EmployeeName
i need to prevent user B To modify same record using time stamp How to do that from c# code and sql server and what modification in stored procedure to accept timestamp
EmployeeTable
EmployeeID
EmployeeName
TimeStampEmp
Meaning allow to another user after specified time

RE: Prevent more user from edit in same record proplem

(OP)
can any one answer for me in this question

RE: Prevent more user from edit in same record proplem

You don't give any indication of what versions of VS and SQL Server you are using, but look in SQL Server's BOL (Books On Line) - help file - for details on Transactions and on Locking and you should find a number of solutions to your problem specific to your version.

RE: Prevent more user from edit in same record proplem

(OP)
version of sql is sql server 2005
and visual studio 2008

RE: Prevent more user from edit in same record proplem

As I suggested use BOL and look up both Transactions and Locking - using one or both should help resolve your issues.

RE: Prevent more user from edit in same record proplem

It may also be helpful to lookup 'database concurrency'.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close