Name the four different cursor and locking types in ADO and describe them briefly?

Showing Answers 1 - 2 of 2 Answers

nilesh

  • Aug 22nd, 2007
 

Cursor type:

adopenforwardonly--- recordset can move only in forward direction good for the situation where only one pass through database need to be done.
adopenkeyset-- recordset are dynamic but new records added by other user can not be seen as well as deleted records by othe users are not accessible
adopendynamic-- all type if changes are visible and can move to any direction
adopenstatic-- static recordset used to search within database.

Locking type:

adlockreadonly-- used for only reading purpose
adlockpessimistic--pessimistic locking record by record. it locks the record immediately upon editing it
adlockoptimistic-- optimistic locking record by record  lock the record when the update command is called.
adlockbatchoptimistic-- optimistic lock for batch processing

  Was this answer useful?  Yes

Cursor types
(1). Static cursor: takes up a snapshot of the recordset at the time of opening,
(2). Dynamic cursor: reflects changes while still in action, slowest type of cursor,
(3). Keyset cursor: like dynamic cursor only, but keeps on updating only key columns to enhance the speed of application,
(4). Forwardonly cursor: fastest and unidirectional cursor type.


Lock types:
(1). Optimistic: maintains locking only for writing, but not reading,
(2). Pessimistic: maintains locking for both reading and writing,
(3). BatchOptimistic: used for a batch operation, like optimistic type,
(4). Readonly: maintains locking; only used for displaying data.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions