Results 1 to 2 of 2

Thread: The BIG Mystery! Can u figure?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Wink

    What does this mean?

    '-- Cursor Type, Lock Type

    '-- ForwardOnly 0 - ReadOnly 1
    '-- KeySet 1 - Pessimistic 2
    '-- Dynamic 2 - Optimistic 3
    '-- Static 3 - BatchOptimistic 4


    RecordSet.Open cmdDC, , 0, 2

  2. #2
    New Member
    Join Date
    Feb 2001
    Location
    Oxford, UK
    Posts
    15
    It's setting parameters for database access.

    A cursor is a pointer that marks the current record (of a recordset), different recordset types have different performance characteristics. A forward only record-set means that you can only go to the next record in the record-set (not the previous) this works more quickly than a two-way cursor.

    A lock-type sets priorities for reading and writing data. If you and I both accessed the same record in a database, and were to then save changes at the same time, one of the updates would be lost. Locking marks the record to say that it is being updated and will stop other people from changing it. Having different lock types enables programmers to maximize the database performance, by only using the lock type that is necessary.

    The last line creates a connection to a database, and specifies how you are going to look at the records (by cursor type) and whether to block the records that you are editing from someone else (by specifying the lock-type)

    Regards,

    Nick

Posting Permissions

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



Click Here to Expand Forum to Full Width