当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO Prepared 属性

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO Prepared 属性


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

The Prepared property sets or returns a Boolean value that, if set to True, indicates that the command should save a prepared version of the query specified in the CommandText property before execution.
Prepared属性的作用是:设置或返回一个逻辑值。如果为True,则表示该指令在第一次执行之前必须保存一个查询语句。

This could slow down the command's first execution, but after the first execution the provider will use the compiled version, which results in a faster execution.
使用这个属性可能会减慢指令第一次的执行速率,但是在第一次执行之后,那么指令提供对象[provider]将使用一个编译版本以提供执行速率。

Syntax
语法

objcommand.Prepared=true or false

Example
案例

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"
set comm=Server.CreateObject("ADODB.Command")
comm.ActiveConnection=conn
comm.CommandText="orders"
comm.Prepared=true
response.write(comm.Prepared)
conn.close
%>

评论 (0) All

登陆 | 还没注册?