PRB: RDS Does Not Work with OLE DB Simple Provider
ID: Q184399
|
The information in this article applies to:
-
Remote Data Service for ADO versions 1.0, 1.5
-
OLE DB Simple Provider Toolkit, version 1.5
SYMPTOMS
When using the Remote Data Service (RDS) for ActiveX Data Objects (ADO)
with an OLE DB provider that was built using the OLE DB Simple Provider
(OSP) Toolkit, the following error may occur:
0x80004005 (Unspecified error)
The error 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 built with the OLE DB Simple Provider (OSP) Toolkit can only return rowsets containing VARIANT type data. RDS cannot remotely marshall VARIANT type data.
RESOLUTION
Here are two workarounds:
- Use a full OLE DB provider.
Do not use an OLE DB provider written with the OSP toolkit with RDS.
Instead, use a full OLE DB provider. The OLE DB 1.5 SDK provides a
sample provider, SAMPPROV, that may be used as the basis for writing a
full OLE DB Provider.
- Pass the recordset back from a business object in another recordset object 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 generated by
OSP, and then create a new recordset dynamically via the RDS
CreateRecordset method, copying 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 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 is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
- Install Microsoft Data Access Components (MDAC) and the OLE DB 1.5 SDK.
- Build the Visual C++ OSP sample that comes with the OSP Toolkit.
- Use Internet Explorer to invoke the following RDS test page:
http://your_machine/MSADC/Samples/adctest.asp
- 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 VC++ OSP sample>
Recordset Status: Complete
Execute Option: Synchronous
- Click the Run button.
RESULTS: The error 0x80004005 (Unspecified error) occurs.
REFERENCES
For additional information, please see the following articles in the
Microsoft Knowledge Base:
Q183294 INFO: Techniques for Returning a Recordset via RDS
Q183315 HOWTO: Write and Validate a Custom Business Object with RDS
Q183609 FILE: Rdsvb.exe Demonstrates How to Use RDS with Visual Basic
Additional query words:
kbrds150bug kbrds200bug kbdse
Keywords : kbRDS
Version : WINDOWS:1.0,1.5
Platform : WINDOWS
Issue type : kbprb