Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Location
    israel
    Posts
    1

    Exclamation Unanswered: can i Lock a record for update???

    hi,

    i am working with ASE 12.0 with the open client lib
    im writting a cross platfrom code to work for win and AIX the same way.

    my question is:
    can i lock a record while it beeing updated?
    what method should i use to do so?
    how do i use transaction using the ASE?

    example code will be the best for me to understand...

    thanks alot

    Ronen.

  2. #2
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    Records are automatically locked when you are changing them (delete, update).

    If you want to use a transaction, you can do something like this:
    Code:
    BEGIN TRAN
      UPDATE sometable SET somecol = 34
        WHERE somecol = 234
    
      -- some other stuff
    COMMIT TRAN
    But individually, every command is a transaction.
    Thanks,

    Matt

Posting Permissions

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