A
amazo
Dear all,
I would like to know if it is possible to close used recordsets in the
middle of transactions (and re-use the variable it is is necessary),
i.e.
--- begin code
Dim ws As DAO.Workspace
Dim db As DAO.Database
dim rst as DAO.Recordset
Set ws = DBEngine(0)
ws.BeginTrans
Set db = ws(0)
set rst = currentdb.openrecordset("table1",dbopendynaset)
... update table1
rst.close
set rst = nothing
set rst = currentdb.openrecordset("table2",dbopendynaset)
... update table2
rst.close
set rst = nothing
ws.CommitTrans
set db = nothing
set ws = nothing
--- end code
Thanks in advance.
Angel.
I would like to know if it is possible to close used recordsets in the
middle of transactions (and re-use the variable it is is necessary),
i.e.
--- begin code
Dim ws As DAO.Workspace
Dim db As DAO.Database
dim rst as DAO.Recordset
Set ws = DBEngine(0)
ws.BeginTrans
Set db = ws(0)
set rst = currentdb.openrecordset("table1",dbopendynaset)
... update table1
rst.close
set rst = nothing
set rst = currentdb.openrecordset("table2",dbopendynaset)
... update table2
rst.close
set rst = nothing
ws.CommitTrans
set db = nothing
set ws = nothing
--- end code
Thanks in advance.
Angel.