Results 1 to 6 of 6

Thread: [RESOLVED] row lock

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2006
    Location
    Jerusalem
    Posts
    39

    Resolved [RESOLVED] row lock

    Hi ,

    I want to connect to a database and update a certain row .. then lock it.

    when trying to access the row again I want to prompt the user he cant because its locked..

    thank you in advance..

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: row lock

    Add field called Updated.

    Before allowing any updates to the record, check the field. If it is empty, allow the update.

    After the first update, put "Yes" in that field.

    Now, the next time someone goes to update that record they won't be able to because of their field entry.

    But, then again, you wouldn't be able to update it either.

    No one could.

    Is that what you want?

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2006
    Location
    Jerusalem
    Posts
    39

    Re: row lock

    thank you HACK,

    are you telling me to add a column to every row holding a boolean value telling if the row has been updated or not?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: row lock

    I'm saying add a field to your table.

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2006
    Location
    Jerusalem
    Posts
    39

    Re: row lock

    thank you hack

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: row lock

    You are welcome.

    If you consider this resolved, you could help us out by pulling down the Thread Tools menu and click the Mark Thread Resolved menu item. That will let everyone know that you have your answer.

    Thank you.

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