In Visual Basic the result code is used to update the Err object and will
cause certain actions to be taken according to the use of the On Error
statement.
If you don"t use an On Error statement, any run-time error that occurs is
fatal; that is, an error message is displayed and execution stops.
An "enabled" error handler is one that has been turned on by an On
Error
statement; an "active" error handler is an enabled handler that is in
the
process of handling an error. If an error occurs while an error handler is
active (between the occurrence of the error and a Resume, Exit Sub, Exit
Function, or Exit Property statement), the current procedure"s error
handler
can't handle the error. Control returns to the calling procedure; if the
calling procedure has an enabled error handler, it is activated to handle the
error. If the calling procedure's error handler is also active, control passes
back through previous calling procedures until an enabled, but inactive,
error handler is found. If no inactive, enabled error handler is found, the
error is fatal at the point at which it actually occurred. Each time the error
handler passes control back to the calling procedure, that procedure
becomes the current procedure. Once an error is handled by an error
handler in any procedure, execution resumes in the current procedure at
the point designated by the Resume statement.
See the online help for Visual Basic for more information.
------------------------------------------------------------------------------------------
Errata:
If your application aborts with
Run-time error '-2147024840' (80070038)
Method: ReadNext
The network BIOS command limit has been
reached
this message is the result of OBjEX passing the wrong error number to the
Windows API. If you get this error it really indicates that the ReadNext method
has reached the end of the list (i.e. there are no more IDs in the select-list).
The error can be eliminated by using an 'On Error Resume Next' statement and
checking the VB Err object as the following code snippet illustrates:
Do
On Error Resume Next
ID = jSelectListObject.ReadNext
If Err = OBJEX_E_NO_MORE_RECORDS Then
Exit Do
Err.Clear
' Do something with ID
Loop