当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO Command对象

ADO
ADO介绍
ADO数据库连接
ADO记录集
ADO显示记录
ADO查询语句
ADO记录排序
ADO添加记录
ADO更新记录
ADO删除记录
ADO演示
ADO提升执行速度
ADO Command对象
ADO Connection对象
ADO Error
ADO Field
ADO Parameter
ADO 属性
ADO Record
ADO Recordset
ADO Stream

ADO Command对象


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 815 ::
收藏到网摘: n/a

Command Object
指令对象

The ADO Command object is used to execute a single query against a database. The query can perform actions like creating, adding, retrieving, deleting or updating records.
ADO指令对象的作用是:对一个数据库执行简单的查询语句。通过使用查询语句,我们可以创建、获取、删除或者更新记录信息。

If the query is used to retrieve data, the data will be returned as a RecordSet object. This means that the retrieved data can be manipulated by properties, collections, methods, and events of the Recordset object.
如果使用查询语句获取数据,那个该数据将以记录对象[RecordSet object]的形式返回。这意味着所有获取的数据可以是记录的属性、集合、方法以及事件所对应的操作对象。

The major feature of the Command object is the ability to use stored queries and procedures with parameters.
ADO指令对象最主要的特点就是通过参数来使用已存的查询语句和程序。

ProgID

set objCommand=Server.CreateObject("ADODB.command")


Properties
属性

Property
属性
Description
描述
ActiveConnection Sets or returns a definition for a connection if the connection is closed, or the current Connection object if the connection is open
如果连接被关闭,它将返回一段关闭的确认信息;如果连接打开,它将返回当前的连接对象
CommandText Sets or returns a provider command
设置或者返回一个数据库连接提供者[provider]的指令信息
CommandTimeout Sets or returns the number of seconds to wait while attempting to execute a command
设置或返回执行指令时所等待的时间(单位:秒)
CommandType Sets or returns the type of a Command object
设置或返回指令对象的类型
Name Sets or returns the name of a Command object
设置或返回指令对象的名称
Prepared Sets or returns a Boolean value that, if set to True, indicates that the command should save a prepared version of the query before the first execution
设置或返回一个逻辑值。如果为True,则表示该指令在第一次执行之前必须保存一个查询语句
State Returns a value that describes if the Command object is open, closed, connecting, executing or retrieving data
返回一个用于描述指令对象是否已被打开、关闭、或正在连接、执行及获取数据的描述值

Methods
方法

Method
方法
Description
描述
Cancel Cancels an execution of a method
取消执行一个方法
CreateParameter Creates a new Parameter object
创建一个新的参数对象
Execute Executes the query, SQL statement or procedure in the CommandText property
执行一个查询语句、SQL语句或者CommandText属性中的一个程序

Collections
集合

Collection
集合
Description
描述
Parameters Contains all the Parameter objects of a Command Object
包括了一个指令中的所有参数对象
Properties Contains all the Property objects of a Command Object
包括了一个指令中的所有属性对象

评论 (0) All

登陆 | 还没注册?