>>>/***************************************************** >>> * Get the customer dataset >>>******************************************************/ >>> >>>string sSelectCommand = "select * from Customers where CustomerKey = 1"; >>> >>>SqlDataAdapter oDataAdapter = new SqlDataAdapter(sSelectCommand, oConnection); >>>DSCustomer oDataSet = new DSCustomer(); >>>oDataAdapter.Fill(oDataSet, "DSCustomer"); >>> >>>/***************************************************** >>> * Or Create an empty customer dataset >>>******************************************************/ >>>//DSCustomer oDataSet = new DSCustomer(); >>> >>>// Add a blank row >>>oDataSet.Tables[0].Rows.Add(); >>> >>> >>>// Get a reference to the table >>>DataTable oTable = oDataSet.Tables[0]; >>> >>>// Get the number of rows >>>int iRowCount = oTable.Rows.Count - 1; >>> >>>// Get a reference to the last row >>>DataRow oRow = oTable.Rows[iRowCount]; >>> >>>// Edit the column values >>>oRow["CustomerName"] = "Someone Else"; >>>oRow["CreditLimit"] = 15; >>> >>>// Save the changes >>>oDataSet.AcceptChanges(); >>>