Executing SQL Commands

To execute a SQL command, create a SQLFCommand from the SQLFire connection and supply the text of a SQL command.

For example:
string sqlfHost = "localhost";
int sqlfPort = 1527;
string connectionStr = string.Format(@"server={0}:{1}", sqlfHost, sqlfPort);

SQLFClientConnection connection = null;

try
{
    connection = new SQLFClientConnection(connectionStr);

    SQLFCommand command = connection.CreateCommand();
    command.CommandType = CommandType.Text;
    command.CommandText = "SELECT COUNT(*) FROM product";

    connection.Open();

    int prodCount = Convert.ToInt32(command.ExecuteScalar());    
}
catch (Exception e)
{
    ///
    /// Log or re-throw exception
    /// 
}
finally
{
    connection.Close();
}