Hi Ivanchain,
How’s your problem going on now?
Based on my experience, I’d like to suggest make a check on the following things, see if they help:
1. Have you defined a primary key or a unique column in data table within database? In order to let CommandBuilder generate commands successfully, we must set primary key or unique column to table.
2. To generate INSERT, UPDATE, or DELETE statements automatically, SqlCommandBuilder uses the SelectCommand property to retrieve a required set of metadata automatically. If you change the SelectCommand after the metadata has been retrieved, such as after the first update, you should call the RefreshSchema method to update the metadata.
3. The SqlCommandBuilder also uses the Connection, CommandTimeout, and Transaction properties referenced by the SelectCommand. The user should call RefreshSchema if one or more of these properties are modified, or if the SelectCommand itself is replaced. Otherwise the InsertCommand, UpdateCommand, and DeleteCommand properties retain their previous values.
Please do not hesitate to let me know if there is still question, and if so, further information is appreciated.
Thanks.
Best wishes,
Jun Wang