网络学院 w3pop社区 网络资源 IT新闻

w3pop.com :: 网络学院 :: ADO :: ADO Prepared 属性

会员登陆

帐号

密码

回答

记住密码

忘记密码? 注册

ADO Prepared 属性


作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 浏览:1151 :: ::

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