RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ADODB.TCursorType Enumeration

TCursorType valies indicate the type of cursor to use for a recordset.

Pascal
TCursorType = (
  ctUnspecified,
  ctOpenForwardOnly,
  ctKeyset,
  ctDynamic,
  ctStatic
);
C++
enum TCursorType {
  ctUnspecified,
  ctOpenForwardOnly,
  ctKeyset,
  ctDynamic,
  ctStatic
};

Use TCursorType values to indicate the type of cursor to use when a recordset is opened. 

The constants of TCursorType correspond with the CursorTypeEnum values for the CursorType property of the ADO recordset object. See the Microsoft Data Access SDK help for information on these values and their effects. 

TCursorType consists of the five constants summarized in the following table:

Cursor Type 
Meaning 
ctUnspecified  
A specific cursor type has not yet been specified.  
ctOpenForwardOnly  
Forward-only cursor in which you can only scroll forward; better performance because only requires single through recordset.  
ctKeyset  
Keyset cursor; records added by other users are not visible; records deleted by other users are inaccessible.  
ctDynamic  
Dynamic cursor; data modifications, deletions, and insertions by other users are visible; scrolling forward and back allowed.  
ctStatic  
Static cursor; static copy of records; data changes by other users not visible; used mostly for reporting.  

Note: Only ctStatic is supported if the CursorLocation property of the ADO dataset component is set to clUseClient.
Note: If the requested cursor type is not supported by the provider, the provider may return another cursor type. This alternate cursor type is reflected in the CursorType property after the recordset is opened.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!