IsError method
The IsError method indicates whether an error occurred during a prior Read operation or Write operation.
If IsError returns true, use the GetLastError method to get the associated error message.
The IsError flag is cleared upon calling GetLastError.
Syntax
- VBScript
oDCO.IsError as Boolean
- C#
bool IsError()
Applies to
Batch object only.Arguments
None.Returns
Returns true if the IsError flag is set; Returns false if the IsError flag is not set.VBScript example
This example checks if there are any errors for the Rulerunner task. If an error is found, it displays the error to a message box.objBatch.BatchDir = "c:\Datacap\MQSW\Batches"
' clear any old errors
sOldError = objBatch.GetLastError
Call objBatch.Write ("rulerunner.xml")
If objBatch.IsError <> 0 Then
msgbox objBatch.GetLastError
End if