1.1

Table Of Contents
DataTable table = new DataTable();
adapter.Fill(table);
// set batch size for best performance
adapter.UpdateBatchSize = 1000;
// now perform the inserts in the DataTable
for (int i = 0; i < 1000; i++) {
DataRow newRow = table.NewRow();
newRow["ID"] = i;
newRow["ADDR"] = "addr" + i;
table.Rows.Add(newRow);
}
// apply the inserts to the underlying SQLFire table
adapter.Update(table);
// drop the table
cmd = conn.CreateCommand();
cmd.CommandText = "drop table t1";
cmd.ExecuteNonQuery();
conn.Close();
VMware.Data.SQLFire.SQLFDataReader
VMware.Data.SQLFire.SQLFDataReader is an implementation of System.Data.IDataReader that provides for
reading result sets obtained by executing the SQLFCommand.ExecuteReader method on a
VMware.Data.SQLFire.SQLFCommand object. It cannot be constructed directly.
This class extends the abstract System.Data.Common.DbDataReader class so users can continue to use that as
the base class for generic coding.
The implementation corresponds to the java.sql.ResultSet interface of JDBC.
It is possible to lock the set of selected rows for update later. In order to actually lock the selected rows, these
conditions must be met:
Set the ReaderLockForUpdate ag to true on the SQLFCommand object before invoking the ExecuteReader
method.
Use a SELECT FOR UPDATE query statement and follow the rules detailed in the section Requirements
for updatable cursors and updatable ResultSets.
The execution must be in the context of an active VMware.Data.SQLFire.SQLFTransaction associated with
the command.
Applications can then update the selected rows (or any others for that matter) in the usual manner by invoking
the update SQL statements, or using a DataAdapter and so forth.
The ability to update a row directly at the current cursor position in the DataReader is not available because of
a SQLFire server limitation for client-server connections. The locks on the rows are released when the active
transaction ends because of a commit or rollback.
See the table in VMware.Data.SQLFire.SQLFType on page 676 for a mapping of expected types of SQL column
and expression query results. For further mapping of the types to corresponding Get* methods in the
SQLFDataReader class for individual SQL types, see Data Types on page 604.
A DataReader can access multiple result sets, if applicable for the DML. You move to the next result set by
invoking the NextResult() method as in the DbReader class. For SQLFire the only case where multiple result
sets can be returned is when invoking a procedure that returns multiple dynamic result sets. See CREATE
PROCEDURE on page 473 (DAP and non-DAP) for more details. SQLFire does not allow for passing multiple
semi-colon separated queries unlike some other database engines.
679
ADO.NET Driver Reference