Rs. OPEN sql,conn,a,b Full Contact!

Source: Internet
Author: User
Tags sql
Rs. OPEN sql,conn,a,b

A:

adOpenForwardOnly (=0)
Read-only and the current data record can only move Down

adOpenKeyset (=1)
Read-only, the current data record is free to move

adOpenDynamic (=2)
Can read and write, the current data record is free to move

adOpenStatic (=3)
Can read and write, the current data record can move freely, can see the new record

B:

adLockReadOnly (=1)
Default lock type, Recordset is read-only, record cannot be modified

adLockPessimistic (=2)
Pessimistic locking, when a record is modified, the data provider attempts to lock the record to ensure that it is successfully edited. Lock the record immediately as soon as the editor starts.

adLockOptimistic (=3)
Optimistic locking is not locked until the update record is submitted with the Update method.

adLockBatchOptimistic (=4)
Bulk optimistic locking allows multiple records to be modified, and records are locked only after the UpdateBatch method is invoked.

When you do not need to change any records, you should use a read-only recordset so that the provider does not have to do any testing.
For general use, optimistic locking may be the best option because records are locked for a short period of time,
The data is updated during this time period. This reduces the use of resources.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.