📄 ado_ref_command.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ADO Command Object</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>ADO Command Object</h1>
<a href="ado_getstring.asp"><img border="0" alt="previous" src="../images/btn_previous.gif" width="100" height="20" /></a>
<a href="ado_ref_connection.asp"><img border="0" alt="next" src="../images/btn_next.gif" width="100" height="20" /></a>
<hr />
<h2>Command Object</h2>
<p>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.</p>
<p>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.</p>
<p>The major feature of the Command object is the ability to use stored queries and procedures
with parameters.</p>
<h3>ProgID</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr valign="top">
<td valign="top">
<pre>set objCommand=Server.CreateObject("ADODB.command")</pre>
</td>
</tr>
</table>
<br />
<hr />
<h3>Properties</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr valign="top">
<th width="30%" align="left" valign="top">Property</th>
<th width="70%" align="left" valign="top">Description</th>
</tr>
<tr valign="top">
<td valign="top"><a href="prop_comm_activeconn.asp">ActiveConnection</a></td>
<td valign="top">Sets or returns a definition for a connection if the connection is closed, or
the current Connection object if the connection is open</td>
</tr>
<tr valign="top">
<td valign="top"><a href="prop_comm_commandtext.asp">CommandText</a></td>
<td valign="top">Sets or returns a provider command</td>
</tr>
<tr>
<td valign="top"><a href="prop_commandtimeout.asp">CommandTimeout</a></td>
<td valign="top">Sets or returns the number of seconds to wait while attempting to execute a
command</td>
</tr>
<tr>
<td valign="top"><a href="prop_comm_commandtype.asp">CommandType</a></td>
<td valign="top">Sets or returns the type of a Command object</td>
</tr>
<tr>
<td valign="top"><a href="prop_comm_name.asp">Name</a></td>
<td valign="top">Sets or returns the name of a Command
object</td>
</tr>
<tr>
<td valign="top"><a href="prop_comm_prepared.asp">Prepared</a></td>
<td valign="top">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</td>
</tr>
<tr>
<td valign="top"><a href="prop_comm_state.asp">State</a></td>
<td valign="top">Returns a value that describes if the Command object is open, closed, connecting, executing or
retrieving data</td>
</tr>
</table>
<h3>Methods</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr valign="top">
<th width="30%" align="left" valign="top">Method</th>
<th width="70%" align="left" valign="top">Description</th>
</tr>
<tr>
<td valign="top"><a href="met_comm_cancel.asp">Cancel</a></td>
<td valign="top">Cancels an execution of a method</td>
</tr>
<tr>
<td valign="top"><a href="met_comm_createparameter.asp">CreateParameter</a></td>
<td valign="top">Creates a new Parameter object</td>
</tr>
<tr>
<td valign="top"><a href="met_comm_execute.asp">Execute</a></td>
<td valign="top">Executes the query, SQL statement or procedure in the
CommandText property</td>
</tr>
</table>
<h3>Collections</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr valign="top">
<th width="30%" align="left" valign="top">Collection</th>
<th width="70%" align="left" valign="top">Description</th>
</tr>
<tr valign="top">
<td valign="top">Parameters</td>
<td valign="top">Contains all the Parameter objects of a Command Object</td>
</tr>
<tr valign="top">
<td valign="top">Properties</td>
<td valign="top">Contains all the Property objects of a Command Object</td>
</tr>
</table>
<br />
<hr />
<a href="ado_getstring.asp"><img border="0" alt="previous" src="../images/btn_previous.gif" width="100" height="20" /></a>
<a href="ado_ref_connection.asp"><img border="0" alt="next" src="../images/btn_next.gif" width="100" height="20" /></a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -