- 10
- 0
- 约1.02万字
- 约 20页
- 2017-06-10 发布于河南
- 举报
VC下的ADO编程入门(国外英文资料)
VC下的ADO编程入门(国外英文资料)
The ADO programming primer for VC
Before the trip to formally enter the ADO programming, familiar with our Connection Command you some important methods of three important object, so in the future write ADO code, method to transfer the right parameter, Let s go
The Connection method
HRESULT Open (_bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options)
parameter
ConnectionString is optional, including connection information
The UserID is optional, including the user name used when the connection is established
Password optional, including the Password used when setting up a connection
OpenOptions optional, ConnectOptionEnum values. If set to adConnectAsync, the connection is opened asynchronously. Adconnectunity is the default option, indicating that the connection is opened simultaneously
_RecordsetPtr Execute (_bstr_t CommandText, VARIANT * RecordsAffected, long Options)
parameter
CommandText is a command string, usually an SQL command, or a table name, stored procedure, etc
2. RecordsAffected optional, is affected by operation after completion of the number of rows
Options can be chosen to interpret the CommandText parameter, which can be a CommandTypeEnum or ExecuteOptionEnum enumerated type value
type
instructions
AdCmdUnspecifed = 1
Not described CommandType property
AdCmdText = 1
The directive provider should assign the CommandText to the text definition of the command.
adCmdTableDirect
The indicator provider should return all rows from the table named for CommandText.
AdCmdTable = 2
The directive provider should assign the CommandText to the table name.
AdCmdStoredProc = 4
The directive provider should assign the CommandText to the stored procedure.
AdCmdUnknown = 8
Instructs the command type unknown in the CommandText parameter.
adExecuteAsync
The directive command should be executed asynchronously.
adFetchAsync
The rows that indicate the initial number specified by the CacheSize attribute should be extracted asynchronou
原创力文档

文档评论(0)