1.1.1

Table Of Contents
{
conn.Open();
// create a table
SQLFCommand cmd = new SQLFCommand(
"create table t1 (id int primary key, addr varchar(20))", conn);
cmd.ExecuteNonQuery();
string cmdStr;
// insert into the table using different command strings
for (int i = 0; i < 1000; i++) {
cmdStr = "insert into t1 values (" + i + ", 'addr" + i + "')";
cmd.AddBatch(cmdStr);
}
int[] results = cmd.ExecuteBatch();
Console.WriteLine(results);
// drop the table
cmd = new SQLFCommand("drop table t1", conn);
conn.Close();
VMware.Data.SQLFire.SQLFCommandBuilder
Automatically constructs SQL commands that apply changes to the underlying SQLFire system when the Update
method of the DataAdapter is invoked.
This class extends ADO.NET's abstract System.Data.Common.DbCommandBuilder class.
Constructor
SQLFCommandBuilder(SQLFDataAdapter adapter) creates a new command builder object associated with the
given DataAdapter.
Typically, you rst set the SelectCommand of the VMware.Data.SQLFire.SQLFDataAdapter to populate a
System.Data.DataSet, then create a SQLFCommandBuilder associated with the DataAdapter. The command
builder object implicitly registers itself as a listener for the RowUpdating events raised by the DataAdapter and
automatically generates the required insert/update/delete SQL command for the same. When the Update method
of the DataAdapter is invoked, the changes are reconciled with the underlying data in the SQLFire system by
applying the SQL commands generated by the command builder.
VMware.Data.SQLFire.SQLFDataAdapter on page 697 shows an example of the constructor.
The MSDN DbCommandBuilder documentation provides more details about the API methods and their use.
VMware.Data.SQLFire.SQLFType
SQLFire SQL types are mapped to corresponding values in the SQLFType enumeration.
Also listed are the corresponding mapping of the ADO.NET's System.Data.DbType enumeration type and the
corresponding .NET type of the object that will be returned by default in query results or that should be passed
as parameter values for a column or expression having that SQL type.
Additional information about the SQL types and their mapping to the ADO.NET API is described in SQLFire
Data Types in ADO.NET on page 685.
Table 41: SQL types to SQLFType mapping
.NET object typeSystem.Data.DbTypeSQLFTypeSQL type
longInt64LongBIGINT
vFabric SQLFire User's Guide696
vFabric SQLFire Reference