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.Text = "SELECT FirstName, LastName FROM GuruStaffList"
or
Set objCommand.Text = "GuruMeditationTable('Name', 'Guru')"

Note that the CommandStream and CommandText properties are mutually exclusive; setting one will clear the other.

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information