Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
Prepared Property
Execute Method
CommandType Property
Connection Object
PROPERTY: Command::CommandText
commandobject.
CommandText
= string
string =
commandobject.
CommandText
The
CommandText
property sets or returns a string that is a text command that can be applied to a data source.
The text command can be any type of command that will be recognized by the provider, such as an SQL statement, a stored procedure, a table name, or a relative URL that specifies a file, folder or resource. The SQL language must be a version that is supported by the provider. The default is the empty string "".
If you need to use the same command repeatedly (even with different parameters) during a connection, set the
Prepared
property of the
Command
object to be
True
. This will cause the command to be compiled and stored for the life of the connection.
Code (VBScript):
Set objCommand.
CommandText
= "SELECT FirstName, LastName" & _
" FROM GuruStaffList"
or
Set objCommand.
CommandText
= "GuruMeditationTable('Name', 'Guru')"
Note that the
CommandStream
and
CommandText
properties are mutually exclusive; setting one will clear the other.
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information