A view of multiple table

Y

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??????????????????????????????
 
C

CaffieneRush

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,799
Messages
2,569,652
Members
45,385
Latest member
ZapGuardianReviews
Top