PDA

Click to See Complete Forum and Search --> : The BIG Mystery! Can u figure?


jesus4u
Feb 16th, 2001, 10:22 AM
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

nickster
Feb 17th, 2001, 08:22 AM
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