Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: RDS Does Not Work Correctly with OLE DB Simple Provider


View products that this article applies to.

This article was previously published under Q250999

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

Steps to Reproduce the Behavior

  1. Install Microsoft Data Access Components (MDAC) Software Development Kit (SDK). The latest version of the MDAC SDK is version 2.5, which ships with Microsoft Windows 2000 Advanced Server or can be downloaded as part of the Platform SDK:
  2. Build the Visual C++ OSP sample that comes with the OSP Toolkit.
  3. Use Internet Explorer to invoke the following RDS test page:
    http://your_machine/MSADC/Samples/adctest.asp
  4. Change the fields on the page to the following:
       ADC Server:          http://your_machine
       Connection:          "provider=SampleOSP_VC; data source=ospsampc"
       Query:               Type in the path to the Customer.txt file that
                               comes with the Visual C++ OSP sample.
       Recordset Status:    Complete
       Execute Option:      Synchronous
    					
  5. Click Run.
The error 0x80004005 (Unspecified error) occurs.

↑ Back to the top


References

For 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

↑ Back to the top


Keywords: kbdatabase, kbprb, kbprovider, KB250999

↑ Back to the top

Article Info
Article ID : 250999
Revision : 3
Created on : 5/12/2003
Published on : 5/12/2003
Exists online : False
Views : 435