The use of "Rs. Open SQL, Conn, 1, 3" 1, 3

Source: Internet
Author: User
Rs. Open SQL, Conn, a, B

A:

Adopenforwardonly (= 0)
Read-only, and the current data record can only be moved down

Adopenkeyset (= 1)
Read-only, the current data records can be freely moved

Adopendynamic (= 2)
Read/write: The current data records can be freely moved.

Adopenstatic (= 3)
Read/write: The current data record can be freely moved. You can see the new record.

B:

Adlockreadonly (= 1)
Default lock type. The record set is read-only and cannot be modified.

Adlockpessimistic (= 2)
Pessimistic locking: When a record is modified, the data provider attempts to lock the record to ensure that the record is edited successfully. You only need to edit the record at the beginning, and lock the record immediately.

Adlockoptimistic (= 3)
Optimistic Locking: The record is locked only when an update record is submitted using the update method.

Adlockbatchoptimistic (= 4)
Optimistic Locking in batches. Multiple records can be modified. Records are locked only after the updatebatch method is called.

When no record needs to be modified, the read-only record set should be used, so that the provider does not need to perform any detection.
For general use, Optimistic Locking may be the best option, because the record is locked for only a short period of time,
The data is updated during this period. This reduces resource usage.

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.