Discussion in 'Database' started by prem_may10, Oct 11, 2006.

  1. prem_may10

    prem_may10 New Member

    Sep 28, 2006
    Likes Received:
    Trophy Points:

    Please give the information on static cursor and Dynamic cursors & difference of those
    with real time examples.

    yasodhar premchand
  2. pradeep

    pradeep Team Leader

    Apr 4, 2005
    Likes Received:
    Trophy Points:
    Kolkata, India
    Home Page:
    Static Cursor
    When you request a static cursor, you are requesting a snapshot of the data at the time the Recordset is created. Once the client has received all the rows, the cursor can scroll through all data without any further interaction with the server. The cursor position can be changed using both relative positioning (offsets from the current, top or bottom row) and absolute positioning (using the row number). The static cursors only shortcoming is that changes made to the database while the Recordset is open arent made available to a client using a static cursor.So, it's less resource expensive.

    Dynamic Cursor
    A dynamic cursor, on the other hand, makes database changes available as they happen. Because the dynamic cursor requires the database provider to reorder data in the Recordset as it changes on the server, it is much more expensive than the static cursor in terms of the processing it requires. Also, because the order of the underlying records could change, only relative positioning is available to dynamic cursors. Lastly, dynamic cursors dont support bookmarks. If you need bookmark support, use a keyset or static cursor.

    The type of cursor you select changes the efficiency of your application, as well as reliability of the data.When you access some data that is not frequently changed use a static cursor and vice-versa.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice