Recordset object

xiaoxiao2021-03-06  91

RecordSet Object Method RecordSet.Open Source, ActiveConnection, Cursortype, LockType, Options Source RecordSet object can be connected to the Command object via the Source property. The Source parameter can be a COMMAND object name, a SQL command, a specified data table name or a Stored ProCedure. If this parameter is omitted, the system uses the Source property of the Recordset object. ActiveConnection RecordSet objects can connect the Connection object through the ActiveConnection property. The ActiveConnection here can be a connection object or a string parameter containing database configuration (Connectionstring). CURSORTYPE RECORDSET Object Open method The CURSORTYPE parameter represents what kind of cursor type starts data, including AdopenForwardOnly, AdoPENDYNAMIC, and AdoPenStatic, is described below: ---------------------------------------------------------------------------------------------------------------------- ------------------------------------------- constant constant value description - -------------------------------------------------- --------- AdopenForwardonly 0 default, start a cacope that can only move forward. AdopenKeyset 1 Start a KEYSET type cursor. AdoPendynamic 2 launches a dynamic type cursor. AdoPenStatic 3 launches a cursor for a Static type. -------------------------------------------------- ----------- The above cursor type will directly affect all the properties and methods all of the Recordset object, the following list describes the differences between them.

-------------------------------------------------- ----------- RECORDSET Property AdopenForwardonly AdopenKeyset AdoPENDYNAMIC ADOPENSTATIC --------------------------------- ---------------------------- AbsolutePage does not support you do not support readable write readable write absolutePosition does not support readable write ActiveConnection readable and writable readable write readable write-readable and write-only bookmark does not support you read / write Cachesize readable and write Cachesize Ready-write read-read-read-read-read-read-read-read-read-read-read-read-only read-read-read-read-read-read-read-read-read-read-read-only-read-read-only-read-read-read-like read-read-only-read-read-only-read-read-only-read-read-only-read-read-only-read-read-only-minded write LockType can read and write can read and write can read and write can read and write can read and write MarshalOptions can read and write can read and write can read and write can read and write MaxRecords can read and write can read and write can read and write can read and write PageCount only not supported not supported read-only read PageSize can read and write can read and write can read and write can read and write RecordCount not supported not supported read only read-only Source can read and write can read and write can read and write can read and write State read-only read-only read-only read-only read-only read-only Status Read-only AddNew support support support support CancelBatch support support support CancelupDate support support support CLONE does not support unsupported support support support support support support support support support support GETROWS support support support MOVE does not support support support MOVEFIRST support support support MoveLAST does not support support support MOVENEXT support support support MOVEPREVIOUS does not support support support NEXTRECORDSET Support Support Open Support Support Support REQUERY Support Support Support Supporting RESYNC does not support support support support support Support support support support UPDATE support support support support UPDATEBATCH Support support support -------------------------- ---------------------------------- in which the nextRecordset method does not apply to the Microsoft Access database. The LockType parameter of the LockType RecordSet object Open method indicates the Lock type to be used. If this parameter is ignored, the system will be preset with the LockType property of the Recordset object. The LockType parameter contains AdlockReadonly, AdlockPrsSIMistic, AdlockOptimistic, and AdlockBatchOptimistic, etc., is described below: ------------------------------------------------------------------------------------------------------------------------------------ -------------------------- constant constant value description ------------------- ------------------------------------------ AdlockReadOnly 1 default value, Recordset Objects are launched in read-only way, and how to operate AddNew, Update, and Delete. AdlockPrsSIMistic 2 when the data source is being updated, the system is temporarily locked to maintain data consistency.

转载请注明原文地址:https://www.9cbs.com/read-122603.html

New Post(0)