简体   繁体   中英

TableAdapter of Strongly Typed dataset won't let me generate the Update method

I have a view from my database being represented as a TableAdapter, but I cannot get it to generate the Update methods. The, "Create methods to send updates directly to the database (GenerateDBDirectMethods)" is grayed out.

How can I enable this? Or will I have to do this manually?

Your table adapter is bound with a view so the schema of associated data-table is the schema of the view. Your view must be involving fields from more than one table so in this case the table-adapter is not able to generate a concrete update statement which can do insert/update operation against the view. So you are not able to generate a distinct Update method for the table-adapter which is associated with a view.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM