﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Can a BO use a view, that joins two tables, for updates</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 05 Jul 2026 23:01:08 GMT</lastBuildDate><ttl>20</ttl><item><title>Can a BO use a view, that joins two tables, for updates</title><link>http://forum.strataframe.net/FindPost9236.aspx</link><description>G'day&lt;/P&gt;&lt;P&gt;I'm using a business object&amp;nbsp;in a grid to update an SQL Server 2005&amp;nbsp;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:&lt;/P&gt;&lt;P&gt;"View or function 'dbo.vw_MyJoinView' is not updatable because the modification affects multiple base tables."&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;Peter&amp;nbsp;</description><pubDate>Fri, 01 Jun 2007 10:23:48 GMT</pubDate><dc:creator>Peter Denton</dc:creator></item><item><title>RE: Can a BO use a view, that joins two tables, for updates</title><link>http://forum.strataframe.net/FindPost9247.aspx</link><description>Good deal :)</description><pubDate>Fri, 01 Jun 2007 10:23:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Can a BO use a view, that joins two tables, for updates</title><link>http://forum.strataframe.net/FindPost9244.aspx</link><description>Thanks Trent,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Peter</description><pubDate>Fri, 01 Jun 2007 09:09:12 GMT</pubDate><dc:creator>Peter Denton</dc:creator></item><item><title>RE: Can a BO use a view, that joins two tables, for updates</title><link>http://forum.strataframe.net/FindPost9239.aspx</link><description>If you are going to use a view, then you have to make an updateable view.&amp;nbsp; You will also need to open the BO Mapper and manually override the primary key field and specify a primary key field.&amp;nbsp; It gets more complicated (whether using SF or not) when you start to create updateable views because there are just more things that need to be set.&amp;nbsp; But what you are attempting is possible, as to whether or not it is the best approach just depends on your end goal.&amp;nbsp; Another thing you can do is just create a regular query (SELECT statement) that pulls in all of the fields that you need.&amp;nbsp; THen on the BO you can set the fields that do not need to be updates or inserted in the FieldsToExcludeFromInsert or the FieldsToExcludeFromUpdate properties.&amp;nbsp; This way you achieve the same functionality without going through a view and complicating your INSERTs and UPDATEs.</description><pubDate>Fri, 01 Jun 2007 08:27:05 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>