Can a BO use a view, that joins two tables, for updates


Author
Message
Peter Denton
Peter Denton
StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)
Group: Forum Members
Posts: 77, Visits: 787
G'day

I'm using a business object in a grid to update an SQL Server 2005 table, but I've based the BO on a view which joins two tables because I want one column from the other table for grouping and sorting the grid. I get an exception when I edit a record and save:

"View or function 'dbo.vw_MyJoinView' is not updatable because the modification affects multiple base tables."

I'm looking for a bit of guidance here, is what I'm attempting here possible (or sensible), or do I give up and find some other means of achieving what I'm after?

Peter 

Replies
Peter Denton
Peter Denton
StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)StrataFrame User (429 reputation)
Group: Forum Members
Posts: 77, Visits: 787
Thanks Trent,

I'd figured out the override of the primary key, but your suggestion of using the FieldsToExcludeFromInsert / FieldsToExcludeFromUpdate properties sounds much easier. I'll give it a go.

Peter

Trent Taylor
Trent Taylor
StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Good deal Smile
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