CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    Sri Lanka
    Posts
    64

    About Lockin in SQL Server

    How do i know weather specific record is locked or not using sp_lock or another way?

    for Ex.
    I have an Employees Table. When another user is editing Employee '001' record. Another user try to edit same record, need to check the lock status before start editing.

    I use adLockPessiMistic to open employee table.

    Thank u in advance,

    dinesh

  2. #2
    Join Date
    Apr 2002
    Location
    Egypt
    Posts
    2,210
    sp_lock can't do this...
    but you can just handle the error that will raise if you try to open/update the locked record.
    Hesham A. Amin
    My blog , Articles


    <a rel=https://twitter.com/HeshamAmin" border="0" /> @HeshamAmin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured