﻿<?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's Update processing be restricted to only updating columns that have changed?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 09 Sep 2026 00:19:56 GMT</lastBuildDate><ttl>20</ttl><item><title>Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20213.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I don't use the DDT and let SF's standard CRUD processing do the heavy lifting. So, when I change a column in a row and save the change every column in the BO is included in the update irrespective of&amp;nbsp;if they have been changed or not. What I would prefer&amp;nbsp;is&amp;nbsp;for the Update command&amp;nbsp;to&amp;nbsp;only include in the Update the column(s) that have changed. I know I can achieve what I want&amp;nbsp;by adding entries in the ExcludeFromUpdate list or using my own stored proc to do the update but I was hoping there may be a 'magic property' somewhere that can turn this facility on.&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Thu, 23 Oct 2008 13:21:23 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20298.aspx</link><description>Thank you guys, much appreciated all the explanations.</description><pubDate>Thu, 23 Oct 2008 13:21:23 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20286.aspx</link><description>Also, Edhy, using CRUD is faster than using standard UPDATE commands.&amp;nbsp; The parger the table, number of columns, and database size, the more significant the performance becomes.&amp;nbsp; To put it in perspective, we use INSERT and UPDATE sprocs for every single BO in every application that we write (except for the few times that we want to sidestep the standard update logic).&amp;nbsp; There is really no downside to creating UPDATE and INSERT sprocs...unless you consider performance gains a downside :D</description><pubDate>Thu, 23 Oct 2008 10:12:22 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20277.aspx</link><description>Hi Greg,&lt;/P&gt;&lt;P&gt;Thanks for that - obviously I didn't read the Help file closely enough - back to the books!&lt;/P&gt;&lt;P&gt;Edhey - the reason I was interested in this is that I have a&amp;nbsp;BO that is used in lots of places and, in one form (BO instances), I wanted to turn off concurrency control and only allow the user to update one column (while showing many in the UI). Rather than put lots of column names in the 'exclude from update' list I wanted to use a proc for no other reason is seemed like the easiest thing to do.&lt;/P&gt;&lt;P&gt;In terms of procs rather than using SF's standard CRUD I was very interested in this in the early days of our move to SF because our system supports processing in a factory were response time is critical and we can get transaction rates&amp;nbsp;averaging&amp;nbsp;around&amp;nbsp;on insert&amp;nbsp;a second (with quite a bit of ancillary processing via triggers) while still supporting reporting etc. The existing system, which we are redeveloping, does this well using stored procedures. The CRUD option appeared attractive but I didn't think it would have the performance we were looking for but, after quite a bit of testing, I couldn't see any material difference between the two approaches. I believe the reason for this is that SF&amp;nbsp;parameterises its CRUD SQL code. This makes the database performance quicker (in our case the execution plans remain in cache because they are run so frequently) and it also ensures&amp;nbsp;that text input is treated as text literals and therefore eliminates the problems of SQL injection attacks when an ad-hoc sql statement is generated as string&amp;nbsp;of text and executed.&lt;/P&gt;&lt;P&gt;This is the only time we have ever wanted to move away from SF standard CRUD processing. In terms of Greg's comments re complex processing we have quite a bit of that but we always try and handle that in the database via triggers.&lt;/P&gt;&lt;P&gt;Cheers, Peter&amp;nbsp;</description><pubDate>Wed, 22 Oct 2008 20:41:10 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20276.aspx</link><description>Thanks Greg,&lt;/P&gt;&lt;P&gt;So unless there is special need, having the CRUD&amp;nbsp;without SP would be acceptable for any application?&lt;/P&gt;&lt;P&gt;Just want to be on the safe side, since I do have the DDT, but the tables where designed using xCase with not SP for CRUDs.</description><pubDate>Wed, 22 Oct 2008 17:36:41 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20275.aspx</link><description>I don't know why Peter is wanting to use sprocs, but here are a couple of common reasons:&lt;br&gt;
&lt;br&gt;
1. Security.  Often DBAs will disallow any access to tables. All access must be via views and sprocs.  &lt;br&gt;
&lt;br&gt;
2. Complexity. If you need to do additional processing during a CRUD action, then a sproc is a fast server side option. E.g. a complex trigger needs to be executed when a record is added, complex enough that a normal trigger won't do it. &lt;br&gt;
&lt;br&gt;
I'll be interested in other reasons... :D</description><pubDate>Wed, 22 Oct 2008 17:15:51 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20274.aspx</link><description>Hi Greg, Peter&lt;/P&gt;&lt;P&gt;On the same topic, what&amp;nbsp;would be&amp;nbsp;the advantage of using SP for the CRUD?</description><pubDate>Wed, 22 Oct 2008 17:05:27 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20273.aspx</link><description>Peter, I can answer some of your questions:&lt;br&gt;
&lt;br&gt;
[quote]2)Does using custom update stored procedures require the use of the DDT?[/quote]&lt;br&gt;
&lt;br&gt;
No, it is completely independent of the DDT. The DDT can automagically create the CRUD sprocs for you, but you can create them yourself.  I believe many users are doing it this way.&lt;br&gt;
&lt;br&gt;
[quote]3) If the DDT isn't needed how do I pass my paramenter values to the update stored proc at run time?[/quote]&lt;br&gt;
&lt;br&gt;
You don't. The framework does it for you automatically.  The help topic indicates how to structure the signatures for each of the types of sprocs, based on concurrency type.  If you setup the sproc correclty and setup the BO to use the sprocs (insert, update and delete), then when you call Save or Delete the indicated sproc is automatically called, passing the current values of the current record in the BO.&lt;br&gt;
&lt;br&gt;
Note you can use sprocs for none or as many of the CRUD functions as needed. If a sproc isn't used, then the standard SF generated SQL is used instead.&lt;br&gt;
&lt;br&gt;
Hope that helps!</description><pubDate>Wed, 22 Oct 2008 16:41:02 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20271.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;Yes, I have seen the Help samples. Maybe my question wasn't clear enough:&lt;/P&gt;&lt;P&gt;1) I don't use the DDT.&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;Does using custom update stored procedures require the use of the DDT?&lt;/P&gt;&lt;P&gt;3) If the DDT isn't needed how do I pass my paramenter values to the update stored proc at run time?&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Wed, 22 Oct 2008 15:24:33 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20265.aspx</link><description>There is a sample of what is produced by the DDT in the help that you can reference.&lt;/P&gt;&lt;P&gt;Database Deployment Toolkit -&amp;gt; Stored Procedures -&amp;gt; Table CRUD Stored Procedures&lt;/P&gt;&lt;P&gt;This may not be 100% what you are trying to do, but it does show a sample of an UPDATE stored procecure and what the update sproc will look like (for the most part).&amp;nbsp;</description><pubDate>Wed, 22 Oct 2008 09:11:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20260.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;I decided to take a look at using the UpdateStoredProcedureName and UpdateUsingStoredProcedure properties. I have created a proc with the required parameters but I couldn't see how I would pass in the paramters at runtime. I checked the forum and help and I'm now left with the impression that this&amp;nbsp;may be&amp;nbsp;a DDT only facility (which we don't use at this stage). If this isn't the case can you point me a description of how to pass paramters to the update&amp;nbsp;proc?&lt;/P&gt;&lt;P&gt;Cheers, Peter&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 21 Oct 2008 19:16:35 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Can a BO's Update processing be restricted to only updating columns that have changed?</title><link>http://forum.strataframe.net/FindPost20222.aspx</link><description>Nope, no magic property.&amp;nbsp; Sorry :ermm:&lt;/P&gt;&lt;P&gt;This is a relatively large change.&amp;nbsp; This is something that we may consider in a future update, but the issue primarily comes when using CRUD settings.&amp;nbsp; You cannot use standard UPDATE or INSERT sprocs if you do this.&amp;nbsp; You&amp;nbsp;would in essence have to have an UPDATE sproc for every potential combination, which obviously isn't feasible.&amp;nbsp; Now if you are not using CRUD settings, then this could be done more easily.&amp;nbsp; In either case, though, this is not an option without using the methods you mentioned.&amp;nbsp; It is something that we have discussed and may address in teh future, but for now you will have to use the Exclude properties.</description><pubDate>Mon, 20 Oct 2008 09:22:45 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>