PRB: RDS Does Not Work Correctly with OLE DB Simple Provider (250999)
The information in this article applies to:
- Microsoft Data Access Components 1.5
- Microsoft Data Access Components 2.0
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
- OLE DB Simple Provider Toolkit 1.5
- OLE DB Simple Provider Toolkit 2.0
This article was previously published under Q250999 SYMPTOMS
When the Remote Data Service (RDS) for ActiveX Data Objects (ADO) is used with an OLE DB provider that was built by using the OLE DB Simple Provider (OSP) Toolkit, the following error message may occur:
0x80004005 (Unspecified error)
The error message occurs when you use the RDSServer.DataFactory Query method or when you return the disconnected recordset from a business object.
CAUSE
An OLE DB provider that is built with the OLE DB Simple Provider (OSP) Toolkit can only return rowsets that contain the VARIANT type data. RDS cannot remotely marshal the VARIANT type data.
RESOLUTION
The following are three workarounds for this issue:
- Use a full OLE DB provider. Do not use an OLE DB provider that was written with the OSP Toolkit with RDS. Instead, use a full OLE DB provider. The OLE DB SDK, which is now part of the MDAC SDK, provides a sampleprovider (SAMPPROV) that may be used as the basis for writing a full OLE DB Provider.
- Use the OLEDB Provider Template.
- Pass the recordset back from a business object in another recordset object that was created by the RDSServer.DataFactory CreateRecordset method, instead of using the DataFactory's Query method.
With RDS, you can create a business object that returns a recordset. You could create a normal ADO recordset against the provider that was generated by OSP, and then create a new recordset dynamically through the RDS CreateRecordset method, or by using the Fields.Append method and opening the recordset. Once you have a second recordset, copy the data from the OSP recordset into the new recordset. This is the recordset you pass to your RDS client, and optionally, receive updates from as well. You can pass the RDS-created recordset between the client and the server and use the Recordset.Status field of the recordset that was returned from the client to determine which records are new, to be deleted, or modified, and from there, issue SQL statements against the OSP-provider exposed datasource.
Please refer to the articles in the "References" section for more information.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
183294 INFO: Techniques for Returning a Recordset via RDS
183315 Write and Validate a Custom Business Object with RDS
183609 Rdsvb.exe Demonstrates How to Use RDS with Visual Basic
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbDatabase kbprb kbProvider KB250999 |
---|
|