Forums » .NET » .NET »

In VB6.0, What is difference between adopendynamic, adopenstatic, adopenforwardonly, adopenkeyset


Posted Date: 04 Jul 2005      Posted By:: Rakesh Marwaha Profile photo    Member Level: Silver  Member Rank: 0     Points: 2   Responses: 1

In VB6.0, What is difference between adopendynamic, adopenstatic, adopenforwardonly, adopenkeyset, when we use these all with Recordset to open it.

And also, In VB6.0, What is difference between adlockbatchoptimistic, adlockoptimistic, adlockreadonly, adlockpessimistic.


Responses

#25697    Author: Ratheesh PK      Member Level: Silver      Member Rank: 0     Date: 16/Jul/2005   Rating: 2 out of 52 out of 5     Points: 2

A cursor controls the navigation of records in a recordset and how the records will be updated
adOpenForwardOnly - this is the default cursor if no other is specified. This cursor allows only forward movement through a recordset

adOpenKeyset - this cursor supports forwards as well as backwards navigation. It also allows you to update a recordset and all changes will be reflected in other users recordsets. The cursor also supports bookmarking

adOpenDynamic - this cursor supports forward and backward navigation but bookmarks may not be supported (ie Access). Any changes made to data are immediately visible with no need to resynchronise the cursor with the database

adOpenStatic - this cursor uses a static copy of data from the database and therefore no changes to the data are visible and supports forward and backward navigation

The locktype parameter specifies which type of locking should be used on the cursor when editing data in a recordset

adLockReadOnly - default type used when no locktype is specified
adLockPessimistic - forces the database to lock the entire record when editing first starts
adLockOptimistic - locks records only after you call the UPDATE method of the recordset object
adLockBatchOptimistic - allows batch updating instead of updating each record individually

I think this will clarify your question.


 
Post Reply     

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.





  • Return to Discussion Forum
  • Start new thread


  • Top Contributors
    TodayLast 7 Daysmore...

    Awards & Gifts

    Online Members

    Sumit
    More...
     
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India