PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
CursorOptions (Property)
In french: OptionsCurseur
OLE DBNative Connectors (Native Accesses)Available only with these kinds of connection
..CursorOptions is used to manage the type of cursor used during a connection (Native Accesses, OLE DB, ...). You can:
  • Find out the type of cursor used for a connection (Native Accesses, OLE DB, ...).
  • Define the type of cursor used for the connection (Native Accesses, OLE DB, ...). In this case, if the connection is currently opened, it will be closed and re-opened with the new parameters during the first access to a file that is using this connection.
Notes:
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Example
MyConnection is Connection
// Describe the connection
MyConnection..User = "USER"
MyConnection..Password = "PASSWORD"
MyConnection..Server = "MYSERVER"
MyConnection..Database = "Database"
MyConnection..Provider = hAccessHFClientServer
MyConnection..Access = hOReadWrite
MyConnection..ExtendedInfo = "Extended information"
MyConnection..CursorOptions = hServerCursor

HOpenConnection(MyConnection)
Syntax

Finding out the type of cursor Hide the details

<Type of cursor> = <Connection name>..CursorOptions
<Type of cursor>: Integer constant
Returns the type of cursor used. This parameter can correspond to one or more of the following constants:
Location of cursors
hClientCursorCursor managed by MDAC. Offers more features than a server cursor. A client cursor must necessarily be a static cursor.
hServerCursorCursor managed by the database. This cursor can easily apply the changes performed by the other users to the data.
Type of cursor
hDynamicCursorCursor offering a lot of features but consuming a lot of memory. This cursor allows all types of moves. It allows you to access all the modifications, additions and deletions performed by the other users.
hForwardOnlyCursorFast cursor consuming little memory. The move is performed from the first record to the last one. The data modified by the other users is not visible.
hOpenKeysetCursorCursor that handles a fixed set of records. Only the keys corresponding to the record are stored and not the records (consumes less memory). The deleted records can no longer be accessed. The modifications performed by the other users are visible (but not the additions).
hStaticCursorRetrieves a copy of all the query records in memory (consumes a lot of memory). All types of moves are allowed.
Lock modes
hReadOnlyCursorThe set of records cannot be modified.
hOptimisticCursorThe record is locked when it is updated
hPessimisticCursorThe record is locked as soon as it becomes in edit to be modified.
Note: If no constant was specified in HDescribeConnection or in the connection, this parameter is set to 0.
Caution: Some types of cursors may not be supported by all the OLE DB providers or by all the native accesses.
<Connection name>: Character string (with or without quotes)
Name of connection used. This name was defined:

Modifying the type of cursor Hide the details

<Connection name>..CursorOptions = <Type of cursor>
<Connection name>: Character string (with or without quotes)
Name of connection used. This name was defined:
<Type of cursor>: Integer constant
Returns the type of cursor used. This parameter can correspond to one or more of the following constants:
Location of cursors
hClientCursorCursor managed by MDAC. Offers more features than a server cursor. A client cursor must necessarily be a static cursor.
hServerCursorCursor managed by the database. This cursor can easily apply the changes performed by the other users to the data.
Type of cursor
hDynamicCursorCursor offering a lot of features but consuming a lot of memory. This cursor allows all types of moves. It allows you to access all the modifications, additions and deletions performed by the other users.
hForwardOnlyCursorFast cursor consuming little memory. The move is performed from the first record to the last one. The data modified by the other users is not visible.
hOpenKeysetCursorCursor that handles a fixed set of records. Only the keys corresponding to the record are stored and not the records (consumes less memory). The deleted records can no longer be accessed. The modifications performed by the other users are visible (but not the additions).
hStaticCursorRetrieves a copy of all the query records in memory (consumes a lot of memory). All types of moves are allowed.
Lock modes
hReadOnlyCursorThe set of records cannot be modified.
hOptimisticCursorThe record is locked when it is updated
hPessimisticCursorThe record is locked as soon as it becomes in edit to be modified.
Caution: Some types of cursors may not be supported by all the OLE DB providers or by all the native accesses.
Remarks
..CtCursorOptions allows you to find out the type of cursor used during a connection. This property is kept for backward compatibility. We recommend that you use ..CursorOptions.
See also
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment