grouchyfd
asked on
How do I update and delete from a datagridview that is bound to a view table from a database?
I have VS 2005. I have created a view in my database combining data from 2 different tables. I can update & delete from Ent. Mgr. When I create a datagrid view or a "details" object from the datasource in my ADO.Net app., I get the data from the combined tables entered into the form, but the "save" button is not enabled. I enable the the button but I still cannot update the data entered or deleted in the form. How do I manipulate the data in my dataview thru my form?
Thanks
Thanks
1) If you are using Inner Joins, or any other complex queries like that, you will not be able to update.
2) Are you using Table adapters?
Bob
2) Are you using Table adapters?
Bob
ASKER
I tried to create a view using joins and found that the table adapter wouldn't allow me to update. When I tried to code it, the intelisence would not bring up the update command. When I go to Enterprise manager and create a view there, I can update it. I guess I'll try to see if I can do it through a SQL command.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I won't be able to get to my machine until tomorrow. But I'll have to see if I included or not the PK field. I didn't really think about not having enough of the fields, but it does sound logical.
ASKER