Senin, 02 Mei 2016

ADO Recordset Properties



ADO uses a number of the properties exposed in the Recordset object's Properties collection in order to open a Recordset. For instance, ADO will always set the Bookmarkable property to True if you request an updatable Recordset. As a result, ADO may overwrite existing values for these properties.
In general, most of these properties are specific to the behavior of the underlying OLE DB rowset and are not of significant interest or use to the ADO programmer. Of the properties listed below, the Microsoft Jet Provider–specific properties and the Append-Only Rowset property are of the most use to the ADO/Microsoft Jet programmer.

Property Name
Type
Default
Attributes
Description
Access Order




Append-Only Rowset
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset will initially exclude existing records. It prevents editing or deleting existing records in the table or query results.
Blocking Storage Objects
adBoolean
True
adPropRead
adPropRequired
Indicates whether storage objects (adLongVarWChar or adLongBinary fields) may prevent the use of some methods.
Bookmark Type
adInteger
1
adPropRead
adPropRequired
The bookmark type supported by the Recordset. One of the following:
1: The bookmark type is numeric. Numeric bookmarks are based upon a row property that is not dependent on the values of the row's columns. The validity of numeric bookmarks is not changed by modifying the rows columns.
2: The bookmark type is key. Key bookmarks are based on the values of one or more of the row's columns. A key bookmark may be left dangling if the key values of the corresponding row are changed.
Bookmarkable
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset supports bookmarks.
Bookmarks Ordered
adBoolean
False
adPropRead
adPropRequired
Indicates whether bookmarks can be compared to determine the relative position of their records in a Recordset.
Cache Deferred Columns
adBoolean
False
adPropRead
adPropRequired
Indicates whether the provider caches the value of a deferred column when the consumer first gets a value from that column.
Change Inserted Rows
adBoolean
True
adPropRead
adPropRequired
Indicates whether new rows can be changed or modified.
Column Privileges
adBoolean
True
adPropRead
adPropRequired
Indicates whether access rights are restricted on a column-by-column basis. If this property is True, the provider will not execute a query that would specify a column for which the user has no read access rights.
Column Set Notification
adInteger
3
adPropRead
adPropRequired
A bitmask specifying whether the notification phase is cancelable. A combination of zero or more of the following:
1: Ok to do
2: About to do
4: Synch after
Column Writable
adBoolean
True
adPropRead
adPropRequired
Indicates whether a particular column is writable or not. This information can also be obtained through the Field object's Attributes property.
Defer Column
adBoolean
True
adPropRead
adPropRequired
N/A
Delay Storage Object Updates
adBoolean
True
adPropRead
adPropRequired
In delayed update mode, storage objects are also used in delayed update mode. Changes to the object are not transmitted to the data source until Update is called.
Fetch Backwards
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset can fetch backwards.
Hold Rows
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset allows the user to retrieve more records or change the position while holding previously retrieved records with pending changes.
Immobile Rows
adBoolean
False
adPropRead
adPropRequired
If the Recordset is ordered (table-type with a defined index), inserted and updated rows (when one or more of the columns in the ordering criteria are updated) obey the ordering criteria. If the Recordset is not ordered, then inserted rows are not guaranteed to appear in a determinate position and the position of updated rows is not changed.
IAccessor
IColumnsInfo
IColumnsRowset
IConnectionPointContainer
IConvertType
ILockBytes
IRowset
IRowsetChange
IRowsetCurrentIndex
IRowsetIdentity
IRowsetIndex
IRowsetInfo
IRowsetLocate
IRowsetResynch
IRowsetScroll
IRowsetUpdate
ISequentialStream
IStorage
IStream
ISupportErrorInfo
adBoolean
N/A
adPropRead
adPropRequired
N/A
Literal Bookmarks
adBoolean
False
adPropRead
adPropRequired
Bookmarks cannot be compared as a sequence of bytes.
Literal Row Identity
adBoolean
False
adPropRead
adPropRequired
N/A
Lock Mode
adInteger
1
adPropRead
adPropWrite
adPropRequired
The level of locking performed by the recordset.  One of the following:
1: The provider is not required to lock rows at any time to ensure successful updates. Updates may fail when sent to the server for reasons of concurrency.
2: The provider uses the minimum level of locking necessary to ensure that changes successfully written to a single row returned by the most recent fetch will not fail due to a concurrency violation if Update is called before any additional rows are retrieved.
ADO sets this property (among others) based on the LockType of the Recordset.
Maximum Open Rows
adInteger
1
adPropRead
adPropRequired
The maximum number of rows that can be active at the same time. This limit does not reflect resource limitations such as RAM.
Maximum Pending Rows
adInteger
1
adPropRead
adPropRequired
The maximum number of rows that can have pending changes at the same time. This limit does not reflect resource limitations such as RAM.
Maximum Rows
adInteger
0
adPropRead
adPropRequired
The maximum number of rows that can be returned in a Recordset. If there is no limit, this value is zero.
Memory Usage
adInteger
0
adPropRead
adPropRequired
The estimated amount of memory that can be used by a Recordset. If it is 0, the Recordset can use unlimited memory. If it is between 1 and 99 inclusive, the Recordset can use the specified percentage of total available virtual memory (physical and page file). If it is greater than or equal to 100, the Recordset can use up to the specified number of kilobytes in memory.
Notification Granularity
adInteger
2
adPropRead
adPropRequired
Indicates when the consumer is notified for methods that operate on multiple rows. One of the following:
1: The consumer is notified separately for each phase for each row. A cancellation affects a single row; it does not affect the other rows, and notifications are still sent for those rows.
2: The consumer is notified once for all rows that succeed and once for all rows that fail. This separation can occur at each phase where a change can fail.
Notification Phases
adInteger
27
adPropRead
adPropRequired
A bitmask specifying the notification phases supported by the provider. These are used internally by ADO to support EventNotifications.
Objects Transacted
adBoolean
True
adPropRead
adPropRequired
Indicates whether any object created on the specified column is transacted.
Others' Inserts Visible
adBoolean
False
adPropRead
adPropRequired
Indicates whether the Recordset can see records inserted by others.
Others' Changes Visible
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset can see updates and deletes made by others.
Own Changes Visible
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset can see its own updates and deletes.
Own Inserts Visible
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset can see its own inserts.
Preserve on Abort
adBoolean
False
adPropRead
adPropRequired
Indicates whether after aborting a transaction, the Recordset remains active. That is, whether it is possible to fetch new rows, update, delete, and insert rows, and so on.
Preserve on Commit
adBoolean
True
adPropRead
adPropRequired
Indicates whether after committed a transaction, the Recordset remains active. That is, whether it is possible to fetch new rows, update, delete, and insert rows, and so on.
Quick Restart
adBoolean
True
adPropRead
adPropRequired
N/A
Reentrant Events
adBoolean
False
adPropRead
adPropRequired
Indicates whether the provider supports reentrancy on callbacks during notifications.
Remove Deleted Rows
adBoolean
True
adPropRead
adPropRequired
Indicates whether the provider removes records it detects as having been deleted from the Recordset. That is, retrieving a block of records that formerly included a deleted record does not include the deleted record.
Report Multiple Changes
adBoolean
True
adPropRead
adPropRequired
Indicates whether an update or delete can affect multiple records and the provider can detect that multiple records have been updated or deleted.
Return Pending Inserts
adBoolean
False
adPropRead
adPropRequired
Indicates whether methods that fetch rows can return pending insert rows.
Row Delete Notification
Row First Change Notification
Row Insert Notification
Row Resynchronization Notification
Row Undo Change Notification
Row Undo Delete Notification
Row Undo Insert Notification
Row Update Notification
Rowset Fetch Position Change Notification
Rowset Release Notification
adInteger
3
adPropRead
adPropRequired
A bitmask specifying whether the notification phase is cancelable.
Row Privileges
adBoolean
False
adPropRead
adPropRequired
Indicates whether access rights are restricted on a row-by-row basis. If the Recordset supports updates, some, but not all of the rows may be updated.
Row Threading Model
adInteger
1
adPropRead
adPropRequired
A bitmask specifying the threading models supported by the Recordset. A combination of one or more of the following:
1: Free Threaded
2: Apartment Threaded
4: SingleThreaded
Scroll Backwards
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset can scroll backward.
Server Data on Insert
adBoolean
True
adPropRead
adPropWrite
adPropRequired
Indicates whether at the time an insert or update is sent to the data source the provider retrieves data from the data source to update the local row cache.
Skip Deleted Bookmarks
adBoolean
False
adPropRead
adPropRequired
N/A
Strong Row Identity
adBoolean
False
adPropRead
adPropRequired
N/A
Updatability
adInteger
0
adPropRead
adPropWrite
adPropRequired
A bitmask specifying the supported methods for modifying the Recordset.
1: Modifying an existing record is supported.
2: Deleting records is supported.
4: Inserting records is supported.
Use Bookmarks
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Recordset supports bookmarks.
Jet OLEDB:Bulk Transactions
adInteger
0
adPropRead
adPropWrite
adPropRequired
Determines if SQL bulk operations are transacted. This property determines if the current command execution is transacted.
0: (JET_BULKTRAN_DEFAULT) Default
1: (JET_BULKTRAN_NOBULK) Use partial updates like Access
2: (JET_BULKTRAN_BULK) Use no partial behavior. All or nothing.
Jet OLEDB:Enable Fat Cursors
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether Microsoft Jet should cache multiple rows when populating the cursor for remote row sources.
Jet OLEDB:Fat Cursor Cache Size
adInteger
0
adPropRead
adPropWrite
adPropRequired
Number of rows which should be cached when using remote data source row caching. Only used if Jet OLEDB:Enable Fat Cursors is True.
Jet OLEDB:Grbit Value
adInteger
0
adPropRead
adPropWrite
adPropRequired
N/A
Jet OLEDB:Inconsistent
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Allows inconsistent updates on query results. Equivalent to DAO's dbInconsistent flag.
Jet OLEDB:Locking Granularity
adInteger
2
adPropRead
adPropWrite
adPropRequired
Determines if a table is opened using row-level locking. This property is ignored unless Jet OLEDB:Database Locking Mode is set to 1 (JET_LOCKMODE_ROW).
Jet OLEDB:ODBC Pass-Through Statement
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Tells Microsoft Jet that SQL text in a Command object should be passed to the backend unaltered.
Jet OLEDB:Partial Bulk Ops
adInteger
0
adPropRead
adPropWrite
adPropRequired
Th behavior of Microsoft Jet when SQL DML bulk operations fail.
0: (JET_BULKPARTIAL_DEFAULT) Default
1: (JET_BULKPARTIAL_PARTIAL) Allow partial completion of the bulk operation. Could result in inconsistent changes since operations on some rows could succeed and others could fail.
2: (JET_BULKPARTIAL_NOPARTIAL) Fail the bulk operation on a single error.
Jet OLEDB:Pass Through Query Bulk-Op
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Pass-Through Query is a bulk operation (non-row-returning).
Jet OLEDB:Pass Through Query Connect String
adBStr
""
adPropRead
adPropWrite
adPropRequired
Indicates the Microsoft Jet Connect String to be used to connect to the remote data source. This property is ignored unless the Jet OLEDB:ODBC Pass-Through Statement is True.
Jet OLEDB:Stored Query
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Whether the CommandText of the Command object should be interpreted as a stored query instead of an SQL command.
Jet OLEDB:Use Grbit
adInteger
0
adPropRead
adPropWrite
adPropRequired
N/A
Jet OLEDB:Validate Rules On Set
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether Microsoft Jet Validation Rules are evaluated when columns are set or when changes are being committed to the database.

ADOX Table Properties

Property Name
Type
Default
Attributes
Description
Temporary Table
adBoolean
False
adPropRead
adPropRequired
Indicates whether the table is destroyed when the connection is released.
Jet OLEDB:Cache Link Name/Password
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the User Id and password used to open the external database are saved with the connection information.
This property is ignored if Jet OLEDB:Create Link is False.
Jet OLEDB:Create Link
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the table is a linked table (formerly known as an attached table).
A linked table is a table in another database linked to a Microsoft Jet database. Data for linked tables remains in the external database where it can be manipulated by other applications.
Jet OLEDB:Exclusive Link
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the external database is opened exclusively when the linked table is created or used. The value is True if the external database will be opened exclusively and False if the external database will be opened for multi-user access.
This property is ignored if Jet OLEDB:Create Link is False.
Jet OLEDB:Link Datasource
adBStr
""
adPropRead
adPropWrite
adPropRequired
The external database to link to. The default value is an empty string ("").
This property is ignored if Jet OLEDB:Create Link is False.
Jet OLEDB:Link Provider String
adBStr
""
adPropRead
adPropWrite
adPropRequired
Additional connection options used when connecting to the external database. It is similar to the Extended Properties property in the Connection's Properties collection. See the section on External Databases for more information on options that can be specified.
Jet OLEDB:Remote Table Name
adBStr
""
adPropRead
adPropWrite
adPropRequired
The name of the table to link to. This may be different than the local name of the table/link as specified in the Table object's Name property. The default value is an empty string ("").
This property is ignored if Jet OLEDB:Create Link is False.
Jet OLEDB:Table Hidden In Access
adBoolean
False
adPropRead
adPropWrite
adPropRequired
Indicates whether the Table will be hidden in the Microsoft Access user interface.
Jet OLEDB:Table Validation Rule
adBStr
""
adPropRead
adPropWrite
adPropRequired
An expression used to validate data when a record is changed or added to the table. This property is read-only if Jet OLEDB:Create Link is True.
Jet OLEDB:Table Validation Text
adBStr
""
adPropRead
adPropWrite
adPropRequired
The message to be displayed to the user when the validation rule is violated. This property is read-only if Jet OLEDB:Create Link is True.


EmoticonEmoticon