Storing a Table

You can use GFXDDataAdapter to populate a System.Data.DataTable object with the results from a SQL command, or to refresh a DataTable object with new results.

The following example fills a DataTable with rows retrieved from a table, and then uses the DataTable to display each row.
string gfxdHost = "localhost";
int gfxdPort = 1527;
string connectionStr = string.Format(@"server={0}:{1}", gfxdHost, gfxdPort);

GFXDClientConnection connection = null;

    connection = new GFXDClientConnection(connectionStr);

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


    // Create adapter and populate the DataTable object
    GFXDDataAdapter adapter = command.CreateDataAdapter();
    DataTable table = new DataTable("product");

    // Parse the DataTable object by rows
    foreach (DataRow row in table.Rows)
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < row.Table.Columns.Count; i++)
            sb.AppendFormat("{0}, ", (row[i].ToString()));

catch (Exception e)
    /// Log or re-throw exception