Recordset. Open strsql, Conn, 3

Source: Internet
Author: User
Prototype:

Recordset. Open source, activeconnection, cursortype, locktype, options

Parameters:

The first parameter is an SQL statement.

Number 2: Conn, that is, database connection

Third parameter: cursortype | cursor type
-1 -- adopenunspecified: does not specify the type of cursor.
0 -- adopenfowardonly: The cursor can only be forward, creating a read-only record set that can only be rolled forward.
1 -- adopenkeyset: The cursor can be forward or backward. The cursor allows you to add, delete, and modify records, but you cannot see any changes made to your record set by other users.

2 -- adopendynamic: the cursor is dynamic and free. The cursor allows you to add, delete, and modify records, and you can see the modifications made by other users.
3 -- adopenstatic: the record set does not reflect any changes made to other users.

Fourth parameter: locktype | lock type:
1 -- adlockreadoney: records in the record set cannot be modified.
2 -- adlockpessimistic: Lock a record when it is edited
3 -- adlockoptimstic: The record is locked only when the record set update method is called.
4 -- adlockbatchopeimstic: records can only be updated in batches.

 

Fifth parameter: Options

    • commandtypeenum
      1 -- ad1_text: indicates that the provider should calculate commandtext according to the command text definition (such as SQL statement.
      2 -- adcmdtable: indicates that ADO should generate an SQL query to return all rows from a commandtext-named table.
      512 -- adcmdtabledirect: indicates that the provider should return all rows from the table named commandtext.
      4 -- adw.storedproc: indicates that the provider should calculate commandtext Based on the stored procedure.
      8 -- adcmdunknown: indicates that the command type in commandtext is unknown.
      256 -- ad1_file: indicates that recordset should be restored (saved) from the file named in source.
    • executeoptionenum
      adasyncexecute: indicates that the source should be executed asynchronously.
      adasyncfetch: indicates that all remaining rows should be extracted asynchronously after the initial quantity specified in the initial fetch size attribute is extracted. If the required row has not been extracted, the main thread will be blocked until the row is available again.
      adasyncfetchnonblocking: indicates that the main thread is not blocked during extraction. If the requested row has not been extracted, the current row is automatically moved to the end of the file.

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.