protected Boolean ProcessDataTable(SqlCommand toSqlCommand, Boolean generateCommands = false) { Boolean results = false; try { this.table = new DataTable(); this.adapter = new SqlDataAdapter(toSqlCommand); this.adapter.SelectCommand = toSqlCommand; this.adapter.Fill(this.table); if (generateCommands) { SqlCommandBuilder builder = new SqlCommandBuilder(adapter); adapter.UpdateCommand = builder.GetUpdateCommand(true); } results = true; } catch (Exception ex) { results = false; Logging.LogFormat(2, ex.Message); // at least log the problem } return results; }The idea is to simulate VFP TableUpdate, so I can set various columns values and then call a method that will automatically update my table. I got this suggestion in C# forum at MSDN, but the UpdateCommand generated is so ugly, that I am wondering if there can be any other approach.