In ASP Rs. Open SQL, Conn, 3, and 1, what does 3 and 1 represent?

Source: Internet
Author: User

The complete open syntax in recordset is

CopyCodeThe Code is as follows: secordset. Open source, activeconnection, cursortype, locktype, options

Example: Rs. Open SQL, Conn, 1, 3

Cursortype is
Adopenforwardonly 0 defaults to the cursor type. To open the forward cursor, you can only move forward in the record set.
Adopenkeyset 1 enables the cursor of the keyset type and can be moved forward or backward in the record set. if another user modifies or deletes a record, the change is reflected in the record set. however, if another user adds a new record, the new record will not appear in the record set.
Adopendynamic 2 enables a dynamic cursor that can be moved forward or backward in the record set. Any change to the record caused by other records will be reflected in the record set.
Adopenstatic 3 open the static cursor, which can be moved forward or backward in the record set. However, the static cursor does not reflect any change in the record caused by other users.

Locktype is
Adlockreadonly 1 read-only lock, specifying that records in the record set cannot be modified.
Adlockprssimistic 2: A protected lock that is immediately locked when a record is edited.
Adlockoptimistic 3 open locks, specifying that records can be locked only when the update () method of the record set is called.
Adlockbatchoptimistic 4 open batch lock, the specified records can only be updated in batches.

The two most common methods are as follows:
Rs. Open SQL, Conn, ', read-only
Rs. Open SQL, Conn, 'used for updating or inserting data, read and write

Related Article

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.