How much do you know about the ASP rs.open statement? When learning ASP, we should learn the ASP rs.open statement, but I believe many people don’t know much about this ASP rs.open statement. Now let’s take a look at the detailed description of the ASP rs.open statement.
'*********************************************************************
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'The first parameter
'It can be a table name or a SQL statement
'------------------------------------------------------------- Chinaz^com
'The second parameter
'Specify the current connection.
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'The third parameter
'Indicates CursorType, CursorType indicates what cursor type will be started with,
'Including adOpenForwardOnly, adOpenKeyset, adOpenDynamic and adOpenStatic,
'The following are the descriptions:
'The third parameter constant constant value description
' adOpenForwardOnly 0 Default value, start a cursor that can only move forward (Forward Only).
' adOpenKeyset 1 Start a cursor of Keyset type.
' adOpenDynamic 2 Start a Dynamic type cursor.
' adOpenStatic 3 Starts a Static type cursor.
Webmaster.
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'The above cursor types will directly affect all properties and methods of the Recordset object. The following list explains the difference between them.
'Recordset property adOpenForwardOnly(0) adOpenKeyset(1) adOpenDynamic(2) adOpenStatic(3)
'AbsolutePage does not support Not supported Readable Writeable Readable Write
'AbsolutePosition Not supported Not supported Readable Writeable Readable Write
'ActiveConnection Readable and write Readable and write Readable and write Readable and write
Chinaz.com
'BOF Read-only Read-only Read-only Read-only
'Bookmark does not support No support Readable Writeable Readable Write
'CacheSize Readable and write Readable and write Readable and write Readable and write
Chinaz.com
'CursorLocation Readable and write Readable and write Readable and write Readable and write
'CursorType Readable and write Readable and write Readable and write Readable and write
'EditMode Read-only Read-only Read-only Read-only
'EOF Read-only Read-only Read-only Read-only
Chinaz
'Filter readable and writeable readable and writeable readable and writeable
'LockType Readable and write Readable and write Readable and write Readable and write
'MarshalOptions Readable and writeable Readable and writeable Readable and writeable
'MaxRecords Readable and writeable Readable and writeable Readable and writeable
Www_Chinaz_com
'PageCount is not supported Not supported Read only Read only
'PageSize Readable and write Readable and write Readable and write Readable and write
'RecordCount is not supported Not supported Read only Read only
'Source Readable and write Readable and write Readable and write Readable and write
Station.Main Station
'State Read-only Read-only Read-only Read-only
'Status Read-only Read-only Read-only Read-only
'AddNew Support Support Support Support Webmaster.
'CancelBatch Support Support Support Support
'CancelUpdate Support Support Support Support
'Clone Not Supported Not Supported
'Close Support Support Support Support
Chinese webmaster_station, powering Chinese websites
'Delete Support Support Support Support
'GetRows Support Support Support Support
'Move does not support Support Support Support Support China website. Chief website
'MoveFirst Support Support Support Support
'MoveLast Not Supported Support Support Support
'MoveNext Support Support Support Support
China. Webmaster's website
'MovePrevious Not supported Support Support Support Support
'Open Support Support Support Support
'Requery Support Support Support Support
Chinaz~com
'Resync does not support No support Support Support
'Supports Support Support Support Support
'Update Support Support Support Support Chinese Webmaster Website
'UpdateBatch Support Support Support Support
'NextRecordset Support Support Support Support
The 'NextRecordset method does not work with Microsoft Access databases. China. Webmaster's website
'-----------------------------------------------------------------------------------------------------------------------------
'The fourth parameter
'Indicates LockType to determine the lock (concurrency) type that the provider should use when opening Recordset.
'The following are the descriptions:
'The fourth parameter constant constant value description
' adLockReadOnly 1 default value, the Recordset object is started read-only, and the AddNew, Update, Delete and other methods cannot be run
' adLockPrssimistic 2 When the data source is being updated, the system temporarily locks other users' actions to maintain data consistency.
' adLockOptimistic 3 When the data source is being updated, the system will not lock other users' actions. Other users can add, delete and modify the data. Www.Chinaz.com
' adLockBatchOptimistic 4 When the data source is being updated, other users must change the CursorLocation property to adUdeClientBatch to increase, delete and modify data. China Webmaster Website
'-----------------------------------------------------------------------------------------------------------------------------
'The fifth parameter
'Related to the first parameter,
'If the first parameter is the table name, the fifth parameter uses adCmdTable.
'If the first parameter is a SQL statement, the parameter is adCmdText
'The fifth parameter can be omitted and not filled in
'*********************************************************************************
China. Station. Chief Station
(Note: The code format is not aligned in this editor, if the COPY code is in the DW code view, the code format will be aligned)
The above is the detailed ASP rs.open statement description introduced by the editor of Foxin. I hope that the content of this article will be of some help to everyone’s study or work!