MDAC 2.5 SDK - OLE DB Programmer's Reference
Appendix C: OLE DB Properties


 

DBPROP_SERVERCURSOR

Property group: Rowset

Property set: DBPROPSET_ROWSET

Column? N

Type: VT_BOOL

Typical R/W: R/W

Description: Server Cursor

DBPROP_SERVERCURSOR works in conjunction with other cursor properties, including DBPROP_CLIENTCURSOR, to determine where a cursor, if required, is materialized.

If DBPROPOPTIONS_REQUIRED is specified and this property is set to VARIANT_TRUE for a provider that does not support server-side cursors, or to VARIANT_FALSE for a provider that does not support client-side cursors, the provider returns an error. Otherwise, this property is ignored if no additional cursor properties are specified.

Local providers, for whom the data is always located on the same machine as the rowset consumer, may choose either of the following options:

Client/server providers, for whom the data resides on a different machine than the consumer, typically do not support client cursors. These providers generally return an error if DBPROP_SERVERCURSOR is set to VARIANT_FALSE with DBPROPOPTIONS_REQUIRED and if any other cursor properties are specified as required, or if any required properties are not supported by a cursor implemented on the server.

The following table documents the behavior for client/server providers when DBPROP_SERVERCURSOR is used in combination with any properties that request cursor functionality.

Cursor properties
_SERVERCURSOR
Cursor location
(Success)
Cursor location
(Failure)
true/required true/required Server Error
true/required true/optional Server Client or Error
true/required false/required Client Error
true/required false/optional Client Server or Error
true/optional true/required Server Not satisfied
true/optional true/optional Server Not satisfied
true/optional false/required Client Not satisfied
true/optional false/optional Client Not satisfied

When service components are invoked, they handle the invocation of the client-side cursor as follows: