Data.Win.ADODB.TCustomADODataSet.CursorLocation

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property CursorLocation: TCursorLocation read GetCursorLocation write SetCursorLocation default clUseClient;

C++

__property TCursorLocation CursorLocation = {read=GetCursorLocation, write=SetCursorLocation, default=1};

Properties

Type Visibility Source Unit Parent
property published
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TCustomADODataSet

Description

Specifies whether the cursor for the connection is client-side or server-side.

Use CursorLocation to indicate whether the cursors that use the connection object to connect to the ADO datastore use a client-side or server-side cursor library. CursorLocation only affects connections opened after the property is set. The default value for CursorLocation is clUseClient.

A client-side cursor offers more flexibility. All data is retrieved to the local machine and then operated on there, allowing operations not normally supported by servers like sorting and resorting the data and additional filtering. SQL statements are executed at the server, so for statements that restrict the result set with a WHERE clause, only the reduced result set is retrieved to a local cursor.

A server-side cursor offers less flexibility, but may be more advantageous (or necessary) for large result sets. Using a server-side cursor becomes necessary when the sheer size of a result set exceeds the available disk space that would be needed to create the client-side cursor. Also, many servers only support unidirectional cursors. This would preclude moving the record pointer in the dataset backward (even one record) through the result set.

See Also