PRB: Handling Errors Caused by the MSRDC Update Method (142926)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 4.0
This article was previously published under Q142926 SYMPTOMS
Using the Edit method, followed by the Update method with the RDC (Remote
Data Control), can cause run-time errors generated by the ODBC API that are
identified in the rdoErrors collection and in the Error event of the RDC
that you can disregard. "No Current Row" is an example of an error trapped
in the Error event, and "37000: [Microsoft][ODBC SQL Server Driver][SQL
Server] Incorrect syntax near the keyword 'WHERE'" is an example of an
error from the rdoErrors collection.
RESOLUTION
To correct this problem, add error handling code to ignore error messages
that can be disregarded. The code to trap these errors needs to be located
in two places:
- The first place is the sub procedure that contains the
MSRDC1.Resultset.Update method, where you will place an On Error Goto
statement.
- The second place is in the RDC's Error event in which you will set
CancelError = True to disable its default error handling. The code
example below will show you how to do this.
STATUS
Microsoft has confirmed this to be a issue in the Microsoft products listed
at the beginning of the article. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as it becomes
available.
Modification Type: | Major | Last Reviewed: | 5/7/2003 |
---|
Keywords: | kbprb KB142926 |
---|
|