Results 1 to 2 of 2

Thread: commit

  1. #1
    Join Date
    Mar 2004
    Posts
    16

    Unanswered: commit

    Hi,

    I would like to commit a table by clicking a button (in SQL it would be 'COMMIT [name_of_table]').
    I don't know how this should look like in Visual Basic.

    I'm using MS Access 2000.

    Thanks for any suggestions,
    Pawel

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    Are you using ADO, adUseServer as the CursorLocation, and Transactions?

    In that case you would do it like this (if you are using a Lock type of Optimistic Batching)

    On Error Goto ErrorHandler

    Connection.BeginTrans

    Recordset.UpdateBatch

    Connection.CommitTrans

    ErrorHandler:
    Connection.RollbackTrans
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

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