Microsoft KB Archive/240894

= PRB: RDS: Can't Access COM Object Properties by Using HTTP Protocol =

Article ID: 240894

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Remote Data Service for ADO 2.0
 * Microsoft Remote Data Services 2.1
 * Remote Data Service for ADO 2.5
 * Remote Data Service for ADO 2.6
 * Microsoft Remote Data Services 2.0

-



This article was previously published under Q240894



SYMPTOMS
Remote Data Service (RDS) DataSpace object doesn't allow you to get or set a property of a remote Component Object Model (COM) object when the established protocol is Hypertext Transfer Protocol (HTTP) or HTTP over Secure Socket Layer (HTTPS).

In Visual Basic, you get the following error message when you try to access the object's property:

Run-time error '438' Object doesn't support this property or method

In Active Server Pages (ASP) page, you get the following error message:

Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: [property name]

Accessing properties does work properly if the protocol is Distributed Component Object Model (DCOM).



CAUSE
HTTP is a stateless protocol, which is why your Web server treats each HTTP request for a page as an independent request, because the server retains no knowledge of previous requests. Therefore, setting or getting properties does not make sense on stateless objects and RDS has intentionally prevented access to the object's properties.



RESOLUTION
Use methods with [in], [out] parameters instead of properties to send data to a component created by using RDS.



STATUS
This behavior is by design.



MORE INFORMATION
RDS server-side code works as follows: Given the method name of the object, RDS code first calls IDispatch::GetIDsOfNames to retrieve its dispatch identifier DISPID). It then Invoke's that method using DISPATCH_METHOD only, because RDS does not support DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, or DISPATCH_PROPERTYPUTREF, and trying to use Invoke to access these properties is not supported.

