Results 1 to 5 of 5

Thread: Types of Cursors in ADODB

  1. #1
    Join Date
    Jan 2009
    Posts
    65

    Types of Cursors in ADODB

    Hi, can anyone give me information about the Cursors in ADODB? I don't know anything about it. I am a student of BSC.I.T. and we don't have this in our syllabus. And one of my interview interviewer ask me about the cursors in ADODB and I kept silent. Can anyone give me details about it?

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Types of Cursors in ADODB

    Hi friend, Basically we have four types of cursors in ADODB. Which are as follows:

    1.static
    2.dynamic
    3.keyset
    4.Forward only

    You need to improve your knowledge with the help of different books which are in market or you can get pdf files from the internet and use those for reading.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Types of Cursors in ADODB

    Hi, there are four types of cursors are available in ADODB, which are as follows:

    1.Dynamic Recordsets - This allows viewing the result of add, modify & delete by other users.
    2.Keyset Recordsets - This is similar as Dynamic recordset but prevents looking the changes by the other users.
    3.Static Recordsets - It provides the static copy of a set of records to find data or generate reports.
    4.Forward-only - This improves performance. It behaves identical to a
    static recordset and allows forward-only.

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Types of Cursors in ADODB

    Hi, In ADO there are 4 different cursor types defined:

    • Dynamic cursor - Allows you to see additions, changes, and deletions by other users.
    • Keyset cursor - Like a dynamic cursor, except that you cannot see additions by other users, and it prevents access to records that other users have deleted. Data updation can be visible.
    • Static cursor - Provides a static copy of a recordset for you to use to find data or generate reports.
    • Forward-only cursor - Allows you to only scroll forward through the Recordset. Additions, changes, or deletions by other users will not be visible.


    You can set the cursor type with the help of CursorType property or by the CursorType parameter in the Open method.

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Types of Cursors in ADODB

    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
    %>
    Last edited by Praetor; 28-11-2009 at 01:41 PM.

Similar Threads

  1. ADODB 0x80020009 error problem
    By Halyn in forum Software Development
    Replies: 3
    Last Post: 28-08-2009, 06:50 PM
  2. Mac OS X Cursors for Windows XP
    By Kiho in forum Customize Desktop
    Replies: 6
    Last Post: 12-08-2009, 09:27 AM
  3. Vista cursors in XP
    By banjoman in forum Customize Desktop
    Replies: 3
    Last Post: 08-06-2009, 06:02 PM
  4. ADODB Connection String with password
    By Xan in forum Software Development
    Replies: 2
    Last Post: 21-04-2009, 03:29 PM
  5. Opening .DBF file using ADODB
    By Pratap Gad in forum Software Development
    Replies: 3
    Last Post: 21-04-2009, 02:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,537,388.96885 seconds with 17 queries