Advantage .NET Data Provider
Creates and returns an AdsCommand object associated with the AdsConnection.
public AdsCommand CreateCommand();
This method creates a new AdsCommand object that can be used for executing queries against the open connection. The AdsCommand.Connection property is automatically set when this method is used.
AdsConnection conn = new AdsConnection( "data source = c:\\data;" );
AdsCommand cmd;
// open the connection
conn.Open();
// create a new command object
cmd = conn.CreateCommand();
// specify a query
cmd.CommandText = "select now() from system.iota";
// execute the query
Console.WriteLine( cmd.ExecuteScalar().ToString() );
// close the connection.
conn.Close();