Hello, I have a schedule agent update some record to AS400 .
this agent schedule run for quite sometime already , however it fail recently with error :
LS:DO- ODBC could not complete the requested operation.
after debug , found that it stop at Result.UpdateRow.
I checked the user id , password , connection, data source all working fine, even change the schedule timing rewrite the agent , no effect at all .
But if i click on Run agent from design mode the agent is working fine, upload successfully.
If i remove the On Error Goto ErrorHandler checking, it will not capture any error and show all status completed upload in Notes Records, but there is no record uploaded in AS400.
I am running out of idea, any suggestion , pls advise.
Subject: Schedule agent AND LS:DO- ODBC could not complete the requested operation.
Run agent from design mode uses a locally defined Data Source. The scheduled agent will use the Server defined Data Source. I think you should verify if this 2 Data Source definitions are the same.
In addition to this, you could use a piece of code like the one below to make sure the update worked:
If (Not result.UpdateRow) Then
Print "Error in update: " & result.GetExtendedErrorMessage(result.GetError)
End If
The extended error messages from the AS/400 platform are very descriptive. You will know exactly where is the problem.
Remember the AS/400 files (tables) should be journaled at the OS/400 level in order to get consistent results everytime. Maybe the journal is full? Inactive?