StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Deleting rows in a view...Expand / Collapse
Author
Message
Posted 08/25/2006 12:51:32 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/09/2008 2:20:16 PM
Posts: 436, Visits: 944
If I create a view and then build a BO based on that view and then bind a grid to that BO, can I delete rows in the grid and have it persist back through the BO to the view and delete the selected rows? I do have more than one table in my view. Dont know if that would matter.

Thanks
Post #2478
Posted 08/25/2006 2:00:01 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/01/2008 8:53:41 AM
Posts: 2,671, Visits: 1,879
We have some users that are creating business objects off of views and creating "Instead Of" triggers on the database, but, no, you cannot delete records from a view unless you either index the view or create INSTEAD OF triggers on the view that will allow you to override the DELETE operation on the view.  You'll also need to modify the partial class after it is built to declare the field that will be the "primary key" for the view so the business object can execute the delete operations on the server.

You could also create stored procedures to delete the records from the view and tell the business object to use the specified delete stored procedure, but again, you'll need to modify the partial class to tell the business object which field to call the primary key.


www.bungie.net
Post #2480
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 7:30pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.