Home All Groups Group Topic Archive Search About
Author
29 Mar 2006 12:38 PM
young
In the database,I have a view is create from multiple table, and my sqldatasource get the data from the view.and if I change the data In GridView control,how to update to the database???help!!I'm a Chinese,I know little English!!
?????????????,??????????asp.net????gridview??????????????????????????????

Author
29 Mar 2006 4:17 PM
CaffieneRush@gmail.com
Views in all versions of SQL Server are updatable (can be the target of
UPDATE, DELETE, or INSERT statements), as long as the modification
affects only one of the base tables referenced by the view.

You'll either have to use the ObjectDataSource with a business object
that can run multiple update statements on the base tables
or
modify your view with instead of triggers so that your single update
command would work from your SqlDataSource.

There might be other ways of updating a view with ADO.NET that some
other posters in this newsgroup might suggest.

Regards.