Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506

    Unhappy Unanswered: Test of Different Cursor from same PC

    Hi,
    Can anybody help me? We know Ado curspr are of 4 types -
    1. Static
    2.Forwardonly
    3.Dynamic
    4.Keyset
    Now I want to see the effect of different cursors from the same machine.I have created two instance of VB6 ,Connecting to the Sql Server 2000 database.Two form are open from two different projects,each having their own recordset and connection but they both are connected to the same database and same table.As if two different user are connected to the same table. Now My question is -
    "Is it possible to see the effect of different cursors through this mechanism?I have tried but failed?
    Please tell me why I failed?And how could I see using dynamic cursor the newly added records?
    I hope to hear from you guys.
    Thanks!!
    Joy
    Last edited by rudra; 12-29-05 at 04:38.

  2. #2
    Join Date
    Dec 2005
    Posts
    3

    Test of Different Cursor from same PC

    'And how could I see using dynamic cursor the newly added records'

    for your above quote

    Refresh the Recordset using Recordset.Requery
    or
    close the Recordset using Recordset.Close
    and then Open the Recordset using Open Method.

    Balamurugan

  3. #3
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by balavelocity
    'And how could I see using dynamic cursor the newly added records'

    for your above quote

    Refresh the Recordset using Recordset.Requery
    or
    close the Recordset using Recordset.Close
    and then Open the Recordset using Open Method.

    Balamurugan
    Dear Balamurugan,
    I know how to requery recordset.But is that clarify the qualities of Cursors? U can see the same effect if u requery keyset cursor Recordset....I mean u can see the newly added records.
    But keyset cursor is defined as fixed no of records.My question is then how come we could get the qualities of cursors?
    And what actually requery does?I think it runs the query again using the database.So if this happens then we are connecting the database again and again whenever we r using requery.So then what is the use of cursorS?
    Thankx!!
    Joydeep

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    This is a somewhat involved topic. I would recommend that you locate a copy of Serious ADO: Universal Data Access with Visual Basic, by Rob Macdonald.

    Macdonald spends about 10 pages in his book outlining the various combinations of cursorlocation and cursortypes. Remember, cursorlocation and cursortype are interdependent properties of ADO. It's a good idea to always explicitly define the cursorlocation you are using.

    So, my first question would be... What is the cursorlocation you've specified for your test? If you define adUseClient, the cursortype is ALWAYS set to static, even if you request a different type. And all the results of a query are moved from the server to the client in a client-side cursor, resulting in possible performance issues on a memory constrained client, or on a network bottlenecked system.

    The other issue is that client-side cursors (and their forced static recordsets,) since they make a local copy of the records, inherently separate the client from the database. Changes made in a table cannot be seen by the client until the client refreshes the data set.
    Last edited by loquin; 01-11-06 at 14:32.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •