A
Andrew Gabb
I'm missing something here:
The rollback in the following doesn't work. The UPDATE appears to be
committed automatically.
I'm using Access 2003 DAO linked to MS SQL Server 2005 via ODBC.
Private Sub Test1()
Dim dbx As Database
Dim DBWS As Workspace
Set DBWS = DBEngine.Workspaces(0)
Set dbx = CurrentDb
DBWS.BeginTrans '*** TRANSACTION BEGIN
dbx.Execute "update USER set [Initial]='x' where [Username]= 'AG'",
dbFailOnError
DBWS.Rollback '*** TRANSACTION ROLLBACK
End Sub
Andrew
The rollback in the following doesn't work. The UPDATE appears to be
committed automatically.
I'm using Access 2003 DAO linked to MS SQL Server 2005 via ODBC.
Private Sub Test1()
Dim dbx As Database
Dim DBWS As Workspace
Set DBWS = DBEngine.Workspaces(0)
Set dbx = CurrentDb
DBWS.BeginTrans '*** TRANSACTION BEGIN
dbx.Execute "update USER set [Initial]='x' where [Username]= 'AG'",
dbFailOnError
DBWS.Rollback '*** TRANSACTION ROLLBACK
End Sub
Andrew