VistaDB 5
Example 






VistaDB.Provider Namespace > VistaDBCommand Class > VistaDBCommand Constructor : VistaDBCommand Constructor(String,VistaDBConnection)
The text of the query.
A VistaDBConnection that represents the connection to an instance of VistaDB Database.
VistaDBCommand Constructor(String,VistaDBConnection)
Initializes a new instance of the VistaDBCommand class with the text of the query and a VistaDBConnection.
Syntax
'Declaration
 
Public Function New( _
   ByVal commandText As System.String, _
   ByVal connection As VistaDBConnection _
)
'Usage
 
Dim commandText As System.String
Dim connection As VistaDBConnection
 
Dim instance As New VistaDBCommand(commandText, connection)
public VistaDBCommand( 
   System.string commandText,
   VistaDBConnection connection
)
public VistaDBCommand( 
    commandText: System.String;
    connection: VistaDBConnection
); 
public function VistaDBCommand( 
   commandText : System.String,
   connection : VistaDBConnection
);
public: VistaDBCommand( 
   System.string* commandText,
   VistaDBConnection* connection
)
public:
VistaDBCommand( 
   System.String^ commandText,
   VistaDBConnection^ connection
)

Parameters

commandText
The text of the query.
connection
A VistaDBConnection that represents the connection to an instance of VistaDB Database.
Example
The following example creates a SqlCommand and associated it with VistaDBConnection object
public VistaDBCommand CreateCommand(VistaDBConnection connection)
{
	return new VistaDBCommand("select * from customers", connection);
}
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