|
|
|
|
|
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, when you open a file that uses an open connection, that connection will be closed and reopened with the new parameters.
Remarks: - The connection can correspond to:
- The cursors are ignored in HFSQL Client/Server.
MyConnection is 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 cursor type used. This parameter can correspond to one or more of the following constants: | | Location of cursors | hClientCursor | Cursor managed by MDAC. Generally, it offers more features than a server-side cursor. A client-side cursor is always static. | hServerCursor | Cursor managed by the database. This cursor can easily reflect changes made to data by other users. | Type of cursor | hDynamicCursor | This cursor offers many features, but consumes a lot of memory. This cursor supports all types of scrolling. You can access all insert, update and delete operations made by other users. | hForwardOnlyCursor | This cursor is fast and consumes little memory. The cursor can only move forward and be scrolled from the first to the last record. Changes made by other users are not visible. | hOpenKeysetCursor | This cursor handles a fixed set of records. Only the key of each record is stored and not the actual record (consumes less memory). Deleted records cannot be accessed. Changes made by other users are visible (but added records are not). | hStaticCursor | Makes a copy of all query records in memory (high memory consumption). All types of scrolling are supported. | Lock modes | hReadOnlyCursor | The record set manipulated cannot be modified. | hOptimisticCursor | The record is locked when it is updated | hPessimisticCursor | The record is locked as soon as it is edited. |
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 is 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 is defined: <Cursor type>: Integer constant Returns the cursor type used. This parameter can correspond to one or more of the following constants: | | Location of cursors |
---|
hClientCursor | Cursor managed by MDAC. Generally, it offers more features than a server-side cursor. A client-side cursor is always static. | hServerCursor | Cursor managed by the database. This cursor can easily reflect changes made to data by other users. | Type of cursor | hDynamicCursor | This cursor offers many features, but consumes a lot of memory. This cursor supports all types of scrolling. You can access all insert, update and delete operations made by other users. | hForwardOnlyCursor | This cursor is fast and consumes little memory. The cursor can only move forward and be scrolled from the first to the last record. Changes made by other users are not visible. | hOpenKeysetCursor | This cursor handles a fixed set of records. Only the key of each record is stored and not the actual record (consumes less memory). Deleted records cannot be accessed. Changes made by other users are visible (but added records are not). | hStaticCursor | Makes a copy of all query records in memory (high memory consumption). All types of scrolling are supported. | Lock modes | hReadOnlyCursor | The record set manipulated cannot be modified. | hOptimisticCursor | The record is locked when it is updated | hPessimisticCursor | The record is locked as soon as it is edited. |
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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|