from http://msdn2.microsoft.com/en-us/library/tf579hcz.aspx
When the SelectCommand property is dynamically specified at run time, such as through a query tool that takes a textual command from the user, you may not be able to specify the appropriate InsertCommand, UpdateCommand, or DeleteCommand at design time. If your DataTable maps to or is generated from a single database table, you can take advantage of the DbCommandBuilder object to automatically generate the DeleteCommand, InsertCommand, and UpdateCommand of the DbDataAdapter.
I'm confused that if my selectcommand involves more than one table,
these commands can not be generated automatically, is this true
so during actual development, probabably our select sql will involve many tables, so we've to hand write the sqls , is this true
or most of you will have selectcommand of one table
thx very much

questions about Automatically Generating Commands (DbCommandBuilder )
mt-au
Hi,
Yes this is pretty quite true. If your Select statement includes a primary key and is a single table then the other Commands (INSERT, UPDATE and DELETE) would automatically generated. But otherwise it would not, coz it is quite difficult generate an Insert statement for each table involved in the query. Same also with the other Commands. So you'll have to specify them manually...
cheers,
Paul June A. Domag
kfsoft
The general recommendation is not to use DbCommandBuilder except in very simplistic scenarios. Delete, insert and update aren't available if there are multiple tables.
You should either write your own SQL (ensuring it is parametized to avoid SQL injection attacks) or use an ORM mapping library such as NHibernate.