BUG: Data Loss When You Use the Save Method with adPersistADTG and adUseServer (317913)
The information in this article applies to:
- Microsoft Data Access Components 2.7
- Microsoft Data Access Components 2.6
This article was previously published under Q317913 SYMPTOMS
When you save a large recordset to the Advanced Data Tablegram (ADTG) format by using the Microsoft SQL Server OLE DB Provider (SQLOLEDB) and setting the CursorLocation property to adUseServer, some data may be lost when the recordset is reopened from the file.
NOTE: This behavior does not occur with Microsoft Data Access Components (MDAC) version 2.5.
CAUSE
When you use the Save method to persist the recordset to the file, certain properties are saved with it, including the maximum number of rows. In MDAC 2.6 and MDAC 2.7, this value (DBPROP_MAXROWS) is incorrectly updated.
RESOLUTION
To work around this issue, use any of the following methods:
- Set the CursorLocation property to adUseClient instead of adUseServer.
- Use the adPersistXML value instead of adPersistADTG.
- Use MSDASQL and the SQL Server ODBC Driver instead of the SQL Server OLEDB Provider.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCES
The following MSDN Web site
states the following:
For best results, set the CursorLocation property to adUseClient with Save. If your provider does not support all of the functionality necessary to save Recordset objects, the Cursor Service will provide that functionality.
For more information about rows and row handles, browse to the following MSDN Web site:
For more information about the DBPROP_MAXROWS value, browse to the following MSDN Web site:
Modification Type: | Major | Last Reviewed: | 4/6/2004 |
---|
Keywords: | kbbug kbnofix KB317913 |
---|
|