public void DisplayUpdateCustomersTable(String connectionString, String commandText)
{
TdConnection cn = new TdConnection(connectionString);
try
{
// Open a connection to Teradata
cn.Open();
// Create a new adapter.
TdDataAdapter adapter = new TdAdapter(commandText, cn);
// Create a new command builder to generate DML statements.
TdCommandBuilder cmdBuilder = new TdCommandBuilder(adapter);
// Cache the results in a dataset
DataSet ds = new DataSet();
adapter.fill(ds, “Call_Log”);
// Display the table to user using DataGrid or other interfaces
// Finally apply the changes back to the Teradata
// Note that TdDataAdapter.UpdateCommand, InsertCommand and
// DeleteCommand is generated by TdCommandBuilder.
adapter.Update(ds, “Call_Log”);
}
finally
{
cn.Close();
}
}