FIX: ADO Recordset Opened from File May Not Update Database (195221)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q195221 SYMPTOMS
Opening an ActiveX Data Objects (ADO) recordset from a file, setting it's
ActiveConnection property to a valid ADO connection object and attempting
to update the database (using either Update or UpdateBatch, depending on
the chosen LockType) does not create an error. However, it does not modify
the database.
CAUSE
In order for a recordset opened from a file to successfully update the back-end database, you must modify the ActiveConnection property after calling
the Open method.
RESOLUTION
The easiest workaround is to set the ActiveConnection property to Nothing
in the Open method. Next, set the ActiveConnection property to the desired
ADO connection object in order to update the database.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This problem has been fixed in the 2.10 service pack 2 release of MDAC and in MDAC versions 2.5 and later.
REFERENCES
You may download the latest version of MDAC by going to downloads at the following site:
Modification Type: | Minor | Last Reviewed: | 3/14/2005 |
---|
Keywords: | kbADO210sp2fix kbBug kbfix kbMDAC210SP2fix kbMDACNoSweep KB195221 |
---|
|