分享
 
 
 

ADO enumeration constants

王朝asp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

ADO enumeration constants

Each of this enum constants are defined in ADO.

Click each enum below to show its constants, values and description.

Connection object

ConnectOptionEnum

Constant

Value

Description

adAsyncConnect

16

Opens the connection asynchronously. The ConnectComplete event may be used to determine when the connection is available.

adConnectUnspecified

-1

Default. Opens the connection synchronously.

Specifies whether the Open method of a Connection object should return after (synchronously) or before (asynchronously) the connection is established.

connection.Open ConnectionString, UserID, Password, Options

ConnectPromptEnum

Constant

Value

Description

adPromptAlways

1

Prompts always.

adPromptComplete

2

Prompts if more information is required.

adPromptCompleteRequired

3

Prompts if more information is required but optional parameters are not allowed.

adPromptNever

4

Never prompts.

Specifies whether a dialog box should be displayed to prompt for missing parameters when opening a connection to a data source.

connection.Properties("Prompt") = adPromptNever

Recordset object

CursorLocationEnum

Constant

Value

Description

adUseClient

3

Uses client-side cursors supplied by a local cursor library. Local cursor services often will allow many features that driver-supplied cursors may not, so using this setting may provide an advantage with respect to features that will be enabled. For backward compatibility, the synonym adUseClientBatch is also supported.

adUseNone

1

Does not use cursor services. (This constant is obsolete and appears solely for the sake of backward compatibility.)

adUseServer

2

Default. Uses data-provider or driver-supplied cursors. These cursors are sometimes very flexible and allow for additional sensitivity to changes others make to the data source. However, some features of the Microsoft Cursor Service for OLE DB (such as disassociated Recordset objects) cannot be simulated with server-side cursors and these features will be unavailable with this setting.

Specifies the location of the cursor service.

recordset.CursorLocation = adUseClient

CursorTypeEnum

Constant

Value

Description

adOpenDynamic

2

Uses a dynamic cursor. Additions, changes, and deletions by other users are visible, and all types of movement through the Recordset are allowed, except for bookmarks, if the provider doesn't support them.

adOpenForwardOnly

0

Default. Uses a forward-only cursor. Identical to a static cursor, except that you can only scroll forward through records. This improves performance when you need to make only one pass through a Recordset.

adOpenKeyset

1

Uses a keyset cursor. Like a dynamic cursor, except that you can't see records that other users add, although records that other users delete are inaccessible from your Recordset. Data changes by other users are still visible.

adOpenStatic

3

Uses a static cursor. A static copy of a set of records that you can use to find data or generate reports. Additions, changes, or deletions by other users are not visible.

adOpenUnspecified

-1

Does not specify the type of cursor.

Specifies the type of cursor used in a Recordset object.

recordset.CursorType = adOpenDynamic

LockTypeEnum

Constant

Value

Description

adLockBatchOptimistic

4

Indicates optimistic batch updates. Required for batch update mode.

adLockOptimistic

3

Indicates optimistic locking, record by record. The provider uses optimistic locking, locking records only when you call the Update method.

adLockPessimistic

2

Indicates pessimistic locking, record by record. The provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately after editing.

adLockReadOnly

1

Indicates read-only records. You cannot alter the data.

adLockUnspecified

-1

Does not specify a type of lock. For clones, the clone is created with the same lock type as the original.

Specifies the type of lock placed on records during editing.

recordset.LockType = adLockReadOnly

Command object

ParameterDirectionEnum

Constant

Value

Description

adParamInput

1

Default. Indicates that the parameter represents an input parameter.

adParamInputOutput

3

Indicates that the parameter represents both an input and output parameter.

adParamOutput

2

Indicates that the parameter represents an output parameter.

adParamReturnValue

4

Indicates that the parameter represents a return value.

adParamUnknown

0

Indicates that the parameter direction is unknown.

Specifies whether the Parameter represents an input parameter, an output parameter, both an input and an output parameter, or the return value from a stored procedure.

command.Parameters(1).Direction = adParamInput

Miscallenous

CommandTypeEnum

Constant

Value

Description

adCmdUnspecified

-1

Does not specify the command type argument.

adCmdText

1

Evaluates CommandText as a textual definition of a command or stored procedure call.

adCmdTable

2

Evaluates CommandText as a table name whose columns are all returned by an internally generated SQL query.

adCmdStoredProc

4

Evaluates CommandText as a stored procedure name.

adCmdUnknown

8

Default. Indicates that the type of command in the CommandText property is not known.

adCmdFile

256

Evaluates CommandText as the file name of a persistently stored Recordset. Used with Recordset.Open or Requery only.

adCmdTableDirect

512

Evaluates CommandText as a table name whose columns are all returned. Used with Recordset.Open or Requery only. To use the Seek method, the Recordset must be opened with adCmdTableDirect.

Specifies how a command argument should be interpreted.

Set recordset = command.Execute (RecordsAffected, Parameters, Options)

-or-

command.Execute RecordsAffected, Parameters, Options

-or-

command.CommandType = adCmdStoredProc

-or-

connection.Execute CommandText, RecordsAffected, Options

-or-

Set recordset = connection.Execute (CommandText, RecordsAffected, Options)

-or-

recordset.Open Source, ActiveConnection, CursorType, LockType, Options

-or-

recordset.Requery Options

ExecuteOptionEnum

Constant

Value

Description

adAsyncExecute

16

Indicates that the command should execute asynchronously.

adAsyncFetch

32

Indicates that the remaining rows after the initial quantity specified in the property should be retrieved asynchronously.

adAsyncFetchNonBlocking

64

Indicates that the main thread never blocks while retrieving. If the requested row has not been retrieved, the current row automatically moves to the end of the file.

If you open a Recordset from a Stream containing a persistently stored Recordset, adAsyncFetchNonBlocking will not have an effect; the operation will be synchronous and blocking.

adAsynchFetchNonBlocking has no effect when the adCmdTableDirect option is used to open the Recordset.

adExecuteNoRecords

128

Indicates that the command text is a command or stored procedure that does not return rows (for example, a command that only inserts data). If any rows are retrieved, they are discarded and not returned.

adExecuteNoRecords can only be passed as an optional parameter to the Command or Connection Execute method.

adExecuteStream

1024

Indicates that the results of a command execution should be returned as a stream.

adExecuteStream can only be passed as an optional parameter to the Command Execute method.

adExecuteRecord

2048

Indicates that the CommandText is a command or stored procedure that returns a single row which should be returned as a Record object.

adOptionUnspecified

-1

Indicates that the command is unspecified.

Specifies how a provider should execute a command. This is the values that the options parameter in an execute command accept

Set recordset = command.Execute (RecordsAffected, Parameters, Options)

-or-

command.Execute RecordsAffected, Parameters, Options

-or-

command.CommandType = adCmdStoredProc

-or-

connection.Execute CommandText, RecordsAffected, Options

-or-

Set recordset = connection.Execute (CommandText, RecordsAffected, Options)

-or-

recordset.Open Source, ActiveConnection, CursorType, LockType, Options

-or-

recordset.Requery Options

ObjectStateEnum

Constant

Value

Description

adStateClosed

0

Indicates that the object is closed.

adStateOpen

1

Indicates that the object is open.

adStateConnecting

2

Indicates that the object is connecting.

adStateExecuting

4

Indicates that the object is executing a command.

adStateFetching

8

Indicates that the rows of the object are being retrieved.

Specifies whether an object is open or closed, connecting to a data source, executing a command, or retrieving data. Read only.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有