Deleting rows in a view...


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
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
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search