CursorOptions (Property) In french: OptionsCurseur
 Available only with these kinds of connection
The CursorOptions property is used to manage the type of cursor used for a connection (Native Connectors, OLE DB, etc.). You can: - Find out the type of cursor used for a connection (Native Connectors, OLE DB, etc.).
- Define the type of cursor used for the connection (Native Connectors, OLE DB, etc.). In this case, if the connection is currently opened, it will be closed and reopened with the new parameters during the first access to a file that uses this connection.
Remarks: - The connection can correspond to:
- The cursors are ignored in HFSQL Client/Server.
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
<Cursor type> = <Connection used>.CursorOptions
<Cursor type>: Integer constant Returns the type of cursor used. This parameter can correspond to one or more of the following constants: | | Location of cursors | hClientCursor | Cursor managed by MDAC. Offers more features than a server cursor. A client cursor must necessarily be a static cursor. | hServerCursor | Cursor managed by the database. This cursor can easily apply the changes performed by the other users to the data. | Type of cursor | hDynamicCursor | Cursor 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. | hForwardOnlyCursor | Fast 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. | hOpenKeysetCursor | Cursor 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. Modifications performed by other users are visible (but records added are not). | hStaticCursor | Makes a copy of all query records in memory (consumes a lot of memory). All types of moves are allowed. | Lock modes | hReadOnlyCursor | The set of records cannot be modified. | hOptimisticCursor | The record is locked when it is updated | hPessimisticCursor | The record is locked as soon as it goes into edit mode to be modified. |
Remark: If no constant was specified in HDescribeConnection or in the connection, this parameter is set to 0.Caution: Not all OLE DB providers or Native Connectors support all cursor types. <Connection used>: Character string or Connection variable Name of the connection used. This name was defined:
Modifying the type of cursor Hide the details
<Connection used>.CursorOptions = <Cursor type>
<Connection used>: Character string or Connection variable Name of the connection used. This name was defined: <Cursor type>: Integer constant Returns the type of cursor used. This parameter can correspond to one or more of the following constants: | | Location of cursors |
---|
hClientCursor | Cursor managed by MDAC. Offers more features than a server cursor. A client cursor must necessarily be a static cursor. | hServerCursor | Cursor managed by the database. This cursor can easily apply the changes performed by the other users to the data. | Type of cursor | hDynamicCursor | Cursor 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. | hForwardOnlyCursor | Fast 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. | hOpenKeysetCursor | Cursor 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. Modifications performed by other users are visible (but records added are not). | hStaticCursor | Makes a copy of all query records in memory (consumes a lot of memory). All types of moves are allowed. | Lock modes | hReadOnlyCursor | The set of records cannot be modified. | hOptimisticCursor | The record is locked when it is updated | hPessimisticCursor | The record is locked as soon as it goes into edit mode to be modified. |
Caution: Not all OLE DB providers or Native Connectors support all cursor types. Remarks The CtCursorOptions property is used to get the type of cursor used in a connection. This property is kept for backward compatibility. It is recommended to use the CursorOptions property.
This page is also available for…
|
|
|
|