VistaDB 6
VistaDB.Provider Namespace / VistaDBCommand Class / CommandText Property
Example


In This Topic
    CommandText Property
    In This Topic
    Gets or sets the text command to run against the data source. Gets or sets the text command to run against the data source.
    Syntax
    'Declaration
     
    
    Public Overrides NotOverridable Property CommandText As System.String
    'Usage
     
    
    Dim instance As VistaDBCommand
    Dim value As System.String
     
    instance.CommandText = value
     
    value = instance.CommandText
    public override System.string CommandText {get; set;}

    Property Value

    The text command to execute. The default value is an empty string ("").
    Example
    The following example creates a new command object and associates it with a given VistaDBConnection object
    public VistaDBCommand CreateCommand(VistaDBConnection connection)
    {
    	VistaDBCommand command = new VistaDBCommand();
    	command.Connection = connection;
    	command.CommandText = "select * from customers";
    	return command;
    }
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also