Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











PROPERTY:  Recordset::CursorType

CursorTypeEnum = recordsetobject.CursorType
recordsetobject.CursorType = CursorTypeEnum


The CursorType property sets or returns a CursorTypeEnum constant that specifies the type of cursor to use when you open a Recordset object. Unfortunately, not all types of cursors are recognized by all providers. If you request a cursor type that is not supported, the provider will probably change the type. The value of the CursorType property will be changed accordingly.

After the Recordset is open, you cannot set the CursorType property. However, you can return the property to see which cursor is actually being used.

CursorTypeEnum Constants
 
Constant Value Description
adOpenDynamic 2 A dynamic cursor with both forward and backward scrolling where additions, deletions, insertions, and updates made by other users are visible
adOpenForwardOnly 0 Default, a forward scrolling only, static cursor where changes made by other users are not visible
adOpenKeyset 1 A keyset cursor allows you to see dynamic changes to a specific group of records but you cannot see new records added by other users
adOpenStatic 3 A static cursor allowing forward and backward scrolling of a fixed, unchangeable set of records
adOpenUnspecified -1 Cursor type not specified

 
Code (VBScript):
Set objRecordset = Server.CreateObject("ADODB.Recordset")
Set objRecordset.ActiveConnection = strConnection
objRecordset.CursorLocation = adUseClient
objRecordset.CursorType = adOpenDynamic
...
objRecordset.Open "ChantList", , , , adCmdTable

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information