ComponentOne True DataControl 8.0
CursorLocation Property

 

CursorLocation Property

Determines if server-side or client-side cursors are used (which cursor engine used).

Syntax

TData.CursorLocation = value

Remarks

Read/Write at run time and design time. Property applies to TData control.

Values

Description

2

adUseServer

3

adUseClient  (default)

This property determines whether server-side or client-side cursors are used for the SourceRecordset in data source mode (DataMode = 0 - DataSource).

When set to 2 – adUseServer, cursors supplied by the data-provider are used. These cursors are sometimes more flexible and might have better performance. However, some features of the Microsoft Client Cursor Provider (for example, Sort and Filter), used with client-side cursors will be unavailable with this setting.

When set to 3 – adUseClient, local cursor library, the Microsoft Client Cursor Provider is used for the cursor engine. It supports additional functionality, such as Filter and Sort properties.

CursorLocation is a standard ADO recordset property. It can be set at any time during the control’s lifetime, but it will take effect only if set at design time, in the WillOpenData event or after the Refresh method is called.

Notes: At design time, this property is not available in property pages and must be set in the Visual Basic Properties window.

The CursorLocation property affects the SourceRecordset only. The TData control’s Recordset always has the 3 – adUseClient setting, which, in fact, has no implications for TData.Recordset.

Caution: Using 3 – adUseClient adds some important functionality to ADO recordsets, such as Filter and Sort, but it is inappropriate for large recordsets for performance reasons. Using 3 – adUseClien, all the data is first fetched from the server to the client, and only then your recordset becomes active. For more information, see Optimizing data access performance and Improvements over standard ADO data sources.

See Also

TData Control

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback