<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: VFP: Not always fixed field structures</title>
	<atom:link href="http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/feed" rel="self" type="application/rss+xml" />
	<link>http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/</link>
	<description>Shedding some light on topics of software development, Visual FoxPro, saving our planet, paying it forward, and anything else I find important enough to share.</description>
	<lastBuildDate>Sun, 13 Jan 2019 18:50:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: Rick Schummer</title>
		<link>http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/comment-page-1/#comment-950</link>
		<dc:creator>Rick Schummer</dc:creator>
		<pubDate>Thu, 02 Jul 2009 10:25:13 +0000</pubDate>
		<guid isPermaLink="false">http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/#comment-950</guid>
		<description>Subrat,&lt;br /&gt;&lt;br /&gt;While your solution may not create errors, it certainly is not the best solution when you are completely changing the true value of the data.</description>
		<content:encoded><![CDATA[<p>Subrat,</p>
<p>While your solution may not create errors, it certainly is not the best solution when you are completely changing the true value of the data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subrat</title>
		<link>http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/comment-page-1/#comment-951</link>
		<dc:creator>Subrat</dc:creator>
		<pubDate>Thu, 02 Jul 2009 10:07:41 +0000</pubDate>
		<guid isPermaLink="false">http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/#comment-951</guid>
		<description>USE TRANSFORM() FUNCTION TO SOLVE THIS PROBLEM.&lt;br /&gt;&lt;br /&gt;FOR EX.&lt;br /&gt;&lt;br /&gt;TRANSFORM(12345.1234,&quot;999.99&quot;)&lt;br /&gt;&lt;br /&gt;CAN FIT THE LARGE NUMBER 12345.1234&lt;br /&gt;TO A 6.2 DIGIT FIELD WITH THE VALUE 0</description>
		<content:encoded><![CDATA[<p>USE TRANSFORM() FUNCTION TO SOLVE THIS PROBLEM.</p>
<p>FOR EX.</p>
<p>TRANSFORM(12345.1234,&quot;999.99&quot;)</p>
<p>CAN FIT THE LARGE NUMBER 12345.1234<br />TO A 6.2 DIGIT FIELD WITH THE VALUE 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Schummer</title>
		<link>http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/comment-page-1/#comment-952</link>
		<dc:creator>Rick Schummer</dc:creator>
		<pubDate>Mon, 24 Jul 2006 19:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/#comment-952</guid>
		<description>Thanks for the additional discussion BOb. You are correct on the example. It is not until you round to a value with six significant digits.&lt;br /&gt;&lt;br /&gt;** Works&lt;br /&gt;REPLACE nCost WITH 99999.49&lt;br /&gt;&lt;br /&gt;** Triggers data overflow error&lt;br /&gt;REPLACE nCost WITH 99999.91&lt;br /&gt;&lt;br /&gt;Any way you look at it, it will be something that can bite you in the behind when you least expect it.With disk space so inexpensive these days it makes sense to use large numeric fields.</description>
		<content:encoded><![CDATA[<p>Thanks for the additional discussion BOb. You are correct on the example. It is not until you round to a value with six significant digits.</p>
<p>** Works<br />REPLACE nCost WITH 99999.49</p>
<p>** Triggers data overflow error<br />REPLACE nCost WITH 99999.91</p>
<p>Any way you look at it, it will be something that can bite you in the behind when you least expect it.With disk space so inexpensive these days it makes sense to use large numeric fields.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Schummer</title>
		<link>http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/comment-page-1/#comment-953</link>
		<dc:creator>Rick Schummer</dc:creator>
		<pubDate>Mon, 24 Jul 2006 18:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/#comment-953</guid>
		<description>I understand your concern Brian, but in this case the competancy of the programmer was the reason the problem was discovered. When converting data from one system to another programmers run into all kinds of problems. It is a natural course to follow. This is why we put in a check and balance system, to ensure the data is rock solid. The reason this problem was discovered was the numbers from the old system did not add up to the numbers in the new system. &lt;br /&gt;&lt;br /&gt;So I am not accepting the error in calculation as you suggest. I am only accepting the behavior of the database product with a 20 year legacy of backwards compatibility, and conformancy to the DBF standard. You see, each database engine has its quirks and trade-offs. This happens to be one of them with DBFs. &lt;br /&gt;&lt;br /&gt;When it comes to developing applications tracking numeric data, database developers add rules to the data to ensure the size of the data stored meets the guidelines of the columns in the data. That is why this problem rarely occurs and one of the reasons I have seen this a couple of times in more than 20 years of software development.</description>
		<content:encoded><![CDATA[<p>I understand your concern Brian, but in this case the competancy of the programmer was the reason the problem was discovered. When converting data from one system to another programmers run into all kinds of problems. It is a natural course to follow. This is why we put in a check and balance system, to ensure the data is rock solid. The reason this problem was discovered was the numbers from the old system did not add up to the numbers in the new system. </p>
<p>So I am not accepting the error in calculation as you suggest. I am only accepting the behavior of the database product with a 20 year legacy of backwards compatibility, and conformancy to the DBF standard. You see, each database engine has its quirks and trade-offs. This happens to be one of them with DBFs. </p>
<p>When it comes to developing applications tracking numeric data, database developers add rules to the data to ensure the size of the data stored meets the guidelines of the columns in the data. That is why this problem rarely occurs and one of the reasons I have seen this a couple of times in more than 20 years of software development.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/comment-page-1/#comment-954</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 24 Jul 2006 17:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/#comment-954</guid>
		<description>I hate to say this, but it is not a bug, but by design. N(5,2) means, Numeric, Length of five, percision of 2 decimals. This doesn&#039;t mean you MUST have two decimals. you can store 12345 in this field if you want.&lt;br /&gt;&lt;br /&gt;What I think is a bug is if you do:&lt;br /&gt;&lt;br /&gt;REPLACE MyField with 12345.1&lt;br /&gt;&lt;br /&gt;and you still don&#039;t get a numeric overflow. But, 123.4 is a perfectly valid value for a 5,2 numeric field.&lt;br /&gt;&lt;br /&gt;BOb Archer</description>
		<content:encoded><![CDATA[<p>I hate to say this, but it is not a bug, but by design. N(5,2) means, Numeric, Length of five, percision of 2 decimals. This doesn&#8217;t mean you MUST have two decimals. you can store 12345 in this field if you want.</p>
<p>What I think is a bug is if you do:</p>
<p>REPLACE MyField with 12345.1</p>
<p>and you still don&#8217;t get a numeric overflow. But, 123.4 is a perfectly valid value for a 5,2 numeric field.</p>
<p>BOb Archer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/comment-page-1/#comment-955</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Mon, 24 Jul 2006 10:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://rickschummer.com/blog2/2006/07/vfp-not-always-fixed-field-structures/#comment-955</guid>
		<description>I am not a database programmer so I don&#039;t understand why that error is not a bug even if it &quot;rarely&quot; occurs.  Either the calculation is correct or it&#039;s not so why is it acceptable?  If I were the client, I would be very concerned for a number of reasons, including; customer complaints, income reporting for tax purposes, etc.  The acceptance of this calculation error by the programmer would also cause the client to question the competence of the programmer, the software and may lead to litigation against the company contracted to do the database programming.</description>
		<content:encoded><![CDATA[<p>I am not a database programmer so I don&#8217;t understand why that error is not a bug even if it &#8220;rarely&#8221; occurs.  Either the calculation is correct or it&#8217;s not so why is it acceptable?  If I were the client, I would be very concerned for a number of reasons, including; customer complaints, income reporting for tax purposes, etc.  The acceptance of this calculation error by the programmer would also cause the client to question the competence of the programmer, the software and may lead to litigation against the company contracted to do the database programming.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
