Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    8

    Unanswered: How to set 'Auto Commit' as false temporarily

    Hi,
    In Sybase database how can we set the 'Auto Commit' as false temporarily.
    I have to perform a rollback statement before commiting a transaction. Even prior to doing a rollback, I need to see the impact of the statements before doing the rollback.

    Thanks,
    Saurabh.

  2. #2
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    There are a couple of possibilities - as you don't say what client application you use I'm not sure which is appropriate.

    The first, traditional method is to use explicit transactions:

    begin tran
    insert ....
    update...

    ...
    commit tran

    The second would be to set the "chained transaction" mode:

    set chained on
    go
    insert ...
    update ...
    ...

    commit tran
    go

    Depending on the client application the "chained" property can also be set on the connection directly.

    Michael

Posting Permissions

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