Microsoft Knowledge Base Email Alertz

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:

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 250999 - Last Review: May 12, 2003 - Revision: 2.1

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

This article was previously published under Q250999

On This Page

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.

STATUS

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

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:
    http://www.microsoft.com/msdownload/platformsdk/setuplauncher.htm (http://www.microsoft.com/msdownload/platformsdk/setuplauncher.htm)
  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.

REFERENCES

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
183294  (http://kbalertz.com/Feedback.aspx?kbNumber=183294/EN-US/ ) INFO: Techniques for Returning a Recordset via RDS
183315  (http://kbalertz.com/Feedback.aspx?kbNumber=183315/EN-US/ ) Write and Validate a Custom Business Object with RDS
183609  (http://kbalertz.com/Feedback.aspx?kbNumber=183609/EN-US/ ) Rdsvb.exe Demonstrates How to Use RDS with Visual Basic

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
Keywords: 
kbdatabase kbprb kbprovider KB250999
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate