Hi, you want the details about the Types of Cursors in ADODB. You need to use the simple cursor that provides the required data access. You need to make choice of cursor type depending upon the use of result set. For just scrolling your data use a forward-only or static cursor. If you have a large result set and need to select just a few rows, use a keyset cursor. If you want to synchronize a result set with recent adds, changes, and deletes by all concurrent users, use a dynamic cursor.
Types of Cursors in ADODB:
- Forward-Only Cursors
- Static Cursors
- Keyset Cursors
- Dynamic Cursors
Syntax:
Code:
objRecordset.CursorType
Example:
Code:
<%
set connect=Server.CreateObject("ADODB.Connection")
connect.Provider="Microsoft.Jet.OLEDB.4.0"
connect.Open(Server.Mappath("northwind.mdb"))
set rst = Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM office"
rst.CursorLocation = adUseClient
rst.CursorType = adOpenStatic
rst.LockType = adLockBatchOptimistic
rst.Open sql, connect
%>
Bookmarks