Thanks, I am still getting this error: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
Here is the code I tried to let the da/cb know what the Key field is.
Dim keys(1) As DataColumn
keys(0) = ds.Tables(0).Columns("CO_ID")
ds.Tables(0).PrimaryKey = keys
>Patrick,
>
>Personally, I avoid the CommandBuilder and prefer to roll my own. But, first to answer your question:
>
>
>MyDataSet.Tables[0].PrimaryKey = new DataColumn[] { MyDataSet.Tables[0].Columns["MyPK"] };
>
>
>I've posted quite a number of times on this topic. You might want to take a look at the following posts:
>
>Message #
1263419>Message #
942418>Message #
1151519>Message #
1058327>
>That might give you a few ideas.
>
>~~Bonnie