﻿<?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?)  » Best Practice for UpdateConcurrencyType?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 00:17:23 GMT</lastBuildDate><ttl>20</ttl><item><title>Best Practice for UpdateConcurrencyType?</title><link>http://forum.strataframe.net/FindPost16178.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;What would be the best option to use between the RowVersion and TimeStamp for checking the concurrency type and why?</description><pubDate>Tue, 06 May 2008 21:06:18 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Best Practice for UpdateConcurrencyType?</title><link>http://forum.strataframe.net/FindPost16223.aspx</link><description>I appreciate your input an making sure of the clarification.&amp;nbsp; When I first dealt with SQL Server I too first thought that a TimeStamp was DateTime related (though you may have known better)...and when re-reading my earlier post it did sound like I was referring to a DateTime field...when I said Date and Time I really meant DateTime and TimeStamp....so thanks for making sure that point was clear.</description><pubDate>Tue, 06 May 2008 21:06:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Best Practice for UpdateConcurrencyType?</title><link>http://forum.strataframe.net/FindPost16222.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;Sorry if I gave the impression I was taking issue with your recommendation.&amp;nbsp;Some developers do get into trouble thinking the timestamp is a 'timestamp' when its not - I was just making it clear what that misnamed data type actually is.&lt;/P&gt;&lt;P&gt;I actually went down the path of using timestamp for concurrency but changed to rowversion as a result of this thread: &lt;A href="http://forum.strataframe.net/Topic7367-6-1.aspx"&gt;http://forum.strataframe.net/Topic7367-6-1.aspx&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Tue, 06 May 2008 20:32:45 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Best Practice for UpdateConcurrencyType?</title><link>http://forum.strataframe.net/FindPost16221.aspx</link><description>One other point here....if you actually wanted to include the concurrency field in any type of query, you are dealing with, as you said, binary data.&amp;nbsp; This becomes more difficult to include in queries if you are trying to determine something in regards to auditing, etc.&amp;nbsp; So if you were trying to filter out records to see only records that have been modified, then you would have to create a query using values like this:&lt;/P&gt;&lt;P&gt;[codesnippet]SELECT COUNT(*) FROM MyTable WHERE MyTimeStampField &amp;lt;= 0x00000000000007D1[/codesnippet]&lt;/P&gt;&lt;P&gt;(Which obviously you would want to use a parm, but you get my point)&lt;/P&gt;&lt;P&gt;Versus using an integer value&lt;/P&gt;&lt;P&gt;[codesnippet]SELECT COUNT(*) FROM MyTable WHERE MyTimeStampField &amp;lt;= 1[/codesnippet]&lt;/P&gt;&lt;P&gt;So anyway that&amp;nbsp;I look at it...it is far easier to deal with an integer...at least in my simple world :P</description><pubDate>Tue, 06 May 2008 19:55:19 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Best Practice for UpdateConcurrencyType?</title><link>http://forum.strataframe.net/FindPost16219.aspx</link><description>Peter,&lt;P&gt;You are right, but that was not my point.&amp;nbsp; The performance issue is not with the incrementing of the value...it is if it will be used within queries for any purpose.&amp;nbsp; It isn't a drastic difference, but I have actually set this up and dealt with this recently, so I know that the TimeStamp is slower than the integer if you will be performing any query operation on the WHERE side that includes a &amp;gt;, &amp;lt;, or a between operation.&lt;P&gt;It is not noticeable unless you are dealing with a larger data set.&amp;nbsp; If you are never going to have a a large database then it really doesn't matter...but I know for a fact that the integer is faster than the time stamp when it relates to queries when dealing with large data sets.&amp;nbsp; If you never do anything but an equal operation on the column then there will not be a noticeable difference whether you are using an&amp;nbsp;integer or a TimeStamp column.&amp;nbsp; But why worry about all of this....if you create a integer row version column then you never have to worry with it regardless....but to each his own :)&amp;nbsp; I was asked for best practices....and this would fall into that category in my book. :)</description><pubDate>Tue, 06 May 2008 19:38:04 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Best Practice for UpdateConcurrencyType?</title><link>http://forum.strataframe.net/FindPost16217.aspx</link><description>Hi Guys,&lt;/P&gt;&lt;P&gt;Not wishing to be pedantic here but a timestamp data type has nothing to do with date/time - it's just sequential binary number that is incremented by 1 every time a row is inserted or updated in the database - yes the database not the table the row is in. So, every row in the database with a timestamp column will always have a unique number in that column.&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Tue, 06 May 2008 17:57:07 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Best Practice for UpdateConcurrencyType?</title><link>http://forum.strataframe.net/FindPost16197.aspx</link><description>Thanks a lot Trent. :hehe:</description><pubDate>Tue, 06 May 2008 13:44:15 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Best Practice for UpdateConcurrencyType?</title><link>http://forum.strataframe.net/FindPost16196.aspx</link><description>Both are far faster than using AllFields for concurrency checking, but the fastest will always be the Integer row version versus the time stamp.&amp;nbsp; Dates and Times are slow to query on, even when pulling back a single record, they are not nearly as fast as testing on a single integer field.&amp;nbsp; The reason is that anytime a test is performed on a DateTime with a &amp;gt; or &amp;lt; in the query, the execution path must first perform some internal sorting, so it is not as fast as just testing with a &amp;gt; or &amp;lt; on an integer.&lt;/P&gt;&lt;P&gt;In most cases, though, the performance difference between the two will be negligible so it would become a preference at this point.&amp;nbsp; But I am always of the mind to go with a better performing solution, no matter how small, when I have a choice...so integer row version fields are always our choice.</description><pubDate>Tue, 06 May 2008 13:40:34 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>