PRB: The ActiveX Data Objects Save and Open Methods Example Do Not Work (268740)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.5
This article was previously published under Q268740 SYMPTOMS The ActiveX Data Objects (ADO) Save and Open Methods
example in Microsoft Visual C++, Microsoft Visual J++, and Microsoft Visual
Basic that were published in the Microsoft Developer Network (MSDN), contain
several errors that cause them not to work. The programs do not make any
changes to the database, as they are designed to, and the Visual Basic and
Visual C++ versions contain syntax errors. CAUSE This behavior occurs because both the Visual C++ and Visual
J++ samples do not open the disconnected recordset in batch update mode. This
is required to later save the data to the database. The Visual Basic sample
does not select the City field from the Authors table. The City field is later
updated and causes an error. RESOLUTION To resolve this behavior, load the recordset in batch
update mode by using adLockBatchOptimistic. For more details, please see the "More Information" section of
this article.
In the Visual Basic sample, make the modifications
shown to remove the syntax error, and to select all fields from the Authors
table.
In the Visual C++ sample make the modifications shown to
remove the syntax error.
Modification Type: | Major | Last Reviewed: | 11/4/2003 |
---|
Keywords: | kbMSXMLnosweep kbprb KB268740 kbAudDeveloper |
---|
|