I am a little confused. I have a set of processes that I am running. i have encapsulated them all in a transaction
{.... my code and work ] (Each function/sub that runs if it encounters an error it changes the Module level variable sys_STN_Continue from TRUE to FALSE and the subsequent steps do not run.
After each of the steps run i check if we should commit and store the records into the table.
While stepping through the code, sys_STN_Continue remains TRUE and it enters the final if/end if section. It appears to run the myWorkspace.Committrans statement. However, I do not see any of the data in the table at the end of the process.
What am I doing wrong?
SQL:
Dim myWorkSpace As DAO.WorkSpace
Set myWorkSpace = DBEngine.Workspaces(0)
myWorkSpace.BeginTrans
{.... my code and work ] (Each function/sub that runs if it encounters an error it changes the Module level variable sys_STN_Continue from TRUE to FALSE and the subsequent steps do not run.
After each of the steps run i check if we should commit and store the records into the table.
SQL:
If sys_STN_Continue Then
myWorkSpace.CommitTrans
Set Meter = Nothing
Else
myWorkSpace.Rollback
MsgBox "Error Occured. Process: StudentTestNeeds_Controller. Unable to Populate Staging Table. Cannot Continue", vbCritical Or vbOKOnly, SYS_APPNAME
Set Meter = Nothing
GoTo Error_Handler_Exit
End If
While stepping through the code, sys_STN_Continue remains TRUE and it enters the final if/end if section. It appears to run the myWorkspace.Committrans statement. However, I do not see any of the data in the table at the end of the process.
What am I doing wrong?