Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2003

    Unanswered: Problem with transaction using MsAccess

    I use MsAccess linking Sql Server tables via ODBC.

    With the following code

    Dim MiBd As Database
    Dim MiWs As Workspace
    Dim MiQr As QueryDef

    Set MiWs = DBEngine(0)
    Set MiBd = MiWs(0)
    Set MiQr = MiBd.QueryDefs("jp Contador")
    MiQr.Execute dbSeeChanges
    MiQr.Execute dbSeeChanges

    the second MiQr.Execute gives me an error: 3146 ODBC call failed

    The query just add 1 to a counter. The error is issued when I try to update the same record twice within the scope of a transaction.

    If I comment out MiWs.Begintrans and Miws.Committrans the process succed in incrementing the counter by two. But this is a bad solution because I need to protect updates with transactions.

    I'm using DAO, MsAcces 97 as Sql Server 2000

    Any Help?
    Last edited by jreymol; 12-16-03 at 09:41.

Posting Permissions

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