﻿<?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?)  » Does FieldsToExcludeFromUpdate/Insert Work?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 27 May 2026 14:21:38 GMT</lastBuildDate><ttl>20</ttl><item><title>Does FieldsToExcludeFromUpdate/Insert Work?</title><link>http://forum.strataframe.net/FindPost7234.aspx</link><description>I have a handful of fields that are handled on the backend (MS-SQL 2K) in a trigger.&amp;nbsp; I assumed that the FieldsToExcludeFrom Update would take care of my issue from collisions during update.&amp;nbsp; Unfortunately the collision still occurs.&amp;nbsp; Here are the fields I have excluded:&lt;/P&gt;&lt;P&gt;SQLRegionID&lt;BR&gt;SQLLastUpdated&lt;BR&gt;SQLIPAddress&lt;BR&gt;SQLEmployeeID&lt;/P&gt;&lt;P&gt;I do not use these fields in the form I have created.&amp;nbsp; The trigger code follows:&lt;/P&gt;&lt;P&gt;CREATE TRIGGER trgInsUpdOffClass ON dbo.OffClass &lt;BR&gt;FOR INSERT, UPDATE&lt;BR&gt;AS&lt;BR&gt;UPDATE OffClass&lt;BR&gt;SET SQLLastUpdated = GetDate(),&lt;BR&gt;SQLEmployeeID = dbo.fnGetContextLogin(),&lt;BR&gt;SQLIPAddress = dbo.fnGetMACAddress()&lt;BR&gt;FROM Inserted i&lt;BR&gt;WHERE i.SQLGUID = OffClass.SQLGUID&lt;/P&gt;&lt;P&gt;The SQLLastUpdated column is causing the collision.&lt;/P&gt;&lt;P&gt;Ideas?&lt;/P&gt;&lt;P&gt;Ben</description><pubDate>Sat, 03 Mar 2007 20:42:07 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item><item><title>RE: Does FieldsToExcludeFromUpdate/Insert Work?</title><link>http://forum.strataframe.net/FindPost7292.aspx</link><description>Hi Ben,&lt;/P&gt;&lt;P&gt;FYI - I've just posted the following in the enhancements request forum: Removing fields from the Data Collision form.&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Sat, 03 Mar 2007 20:42:07 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Does FieldsToExcludeFromUpdate/Insert Work?</title><link>http://forum.strataframe.net/FindPost7286.aspx</link><description>That is an understandable request.&amp;nbsp; You can also use OptimisticAllFields and create stored procedures for UPDATES... within the sproc, you're in complete control over what gets checked and how it gets checked for concurrency purposes.</description><pubDate>Fri, 02 Mar 2007 16:51:01 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Does FieldsToExcludeFromUpdate/Insert Work?</title><link>http://forum.strataframe.net/FindPost7278.aspx</link><description>Then can I request a new property be added to excluded specific fields from the concurrency check?&amp;nbsp; Our DBA is not likely to add new fields to our database.&lt;/P&gt;&lt;P&gt;Ben</description><pubDate>Fri, 02 Mar 2007 12:40:13 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item><item><title>RE: Does FieldsToExcludeFromUpdate/Insert Work?</title><link>http://forum.strataframe.net/FindPost7270.aspx</link><description>What I meant was that when the OptimisticRowVersion or OptimisticTimeStamp is used, those are the only fields that are checked by the concurrency... so the concurrency issue wouldn't be detected.&amp;nbsp; &lt;/P&gt;&lt;P&gt;As for why there is no timestamp column in the command that you posted... that's because you excluded the timestamp column from the update... if it's not included in the udpate, it cannot check it.&amp;nbsp; (the DAL is smart enough to know not to update the timestamp column...)</description><pubDate>Fri, 02 Mar 2007 09:58:09 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Does FieldsToExcludeFromUpdate/Insert Work?</title><link>http://forum.strataframe.net/FindPost7257.aspx</link><description>&lt;BR&gt;Hi,&lt;/P&gt;&lt;P&gt;Pardon the intereuption but I've been checking out concurrency control as well and just can't get the Row Version or Timestamp options working although OptimisticAllFields works ok. I'm not using stored procs for the CRUD. I thought adding my comments in this thread would be appropriate.&lt;/P&gt;&lt;P&gt;Refer to the attached screen shot. You can see the properties I have set for the BO and also the fact that&amp;nbsp; TTTimeStamp exists and is a timestamp datatype. You can also see ATTTimeStamp is in the BOM and has not been customised.&lt;/P&gt;&lt;P&gt;I tested by opening my form and retrieving the data. I then change a row in the SQL Management Studio and save it. I then change the same row in my form exepecting an exception but none is fired.&lt;/P&gt;&lt;P&gt;I have the database debug code turned on and I see the update creates just the following code:&lt;BR&gt;UPDATE [dbo].[tblATTAttrTypes] SET [ATTID] = @ATTID, [ATT_AGTID] = @ATT_AGTID, [ATTType] = @ATTType, [ATTDType] = @ATTDType, [ATTSequ] = @ATTSequ, [ATTName] = @ATTName, [ATTActive] = @ATTActive, [ATTRBatch] = @ATTRBatch, [ATTFBatch] = @ATTFBatch, [ATTSPBatch] = @ATTSPBatch, [ATTSBatch] = @ATTSBatch, [ATTFHide] = @ATTFHide, [ATTSHide] = @ATTSHide, [ATTLookUp] = @ATTLookUp, [ATTMandInLU] = @ATTMandInLU, [ATTRangeFrom] = @ATTRangeFrom, [ATTRangeTo] = @ATTRangeTo, [ATTInputMask] = @ATTInputMask, [ATTGroup1] = @ATTGroup1, [ATTGroup2] = @ATTGroup2, [ATTGroup3] = @ATTGroup3, [ATTExport1] = @ATTExport1, [ATTExport2] = @ATTExport2 WHERE [ATTID] = @ATTID_ORGPK;&lt;/P&gt;&lt;P&gt;No sign of any version checking....&lt;/P&gt;&lt;P&gt;&lt;BR&gt;Another related question (written before I read Ben's post):&lt;BR&gt;As stated above, OptimisticAllFields works ok however the Data Collision form isn't quite what I expected. The Database has fields updated by a trigger e.g. update count, update date, timestamp. These fields are flagged in the BO as do not update on insert/update operation and this is what happens, i.e. they do not appear in the above SQL code. However, if a collision is detetected in concurrency control, they are presented to the user in the Data Collision form. Is there any way of only showing, in the Data Collision form, those fields that were part of SQL update code?&lt;/P&gt;&lt;P&gt;Does you anwer to Ben imply that when rowversion or timestamp is used the problem with showing these 'internal columns' on the Data Collision form just goes away?&lt;/P&gt;&lt;P&gt;Cheers, Peter&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Thu, 01 Mar 2007 21:17:44 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Does FieldsToExcludeFromUpdate/Insert Work?</title><link>http://forum.strataframe.net/FindPost7254.aspx</link><description>Yes, the problem is that the FieldsToExcludeFromUpdate only excludes the fields from the SET portion of the UPDATE... they are still tested on the OptimisticAllFields concurrency.&amp;nbsp; You could optionally change the concurrency type to OptimisticRowVersion or OptimisticTimestamp (either of which is MUCH more efficient anyways) and remove the dependency on that column for concurrency checking.&amp;nbsp; Or you could write an update stored procedure for the table and handle the concurrency in whatever way you see fit.</description><pubDate>Thu, 01 Mar 2007 17:00:10 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>