Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Fox > Re: VFP9 SQL Qu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 11 Topic 841 of 861
Post > Topic >>

Re: VFP9 SQL Query Column Width Bites Again!

by Bernhard Sander <fuchs@[EMAIL PROTECTED] > May 9, 2008 at 05:11 PM

Hi Tom,

> What is the field definition for the field that is overflow? If I run
the 
> below in VFP 7 SP2 and VFP 9 SP2 the field definition  in curTmp3 for f2
is 
> N(6,3).
> 
> If I change f2 to integer in curTmp2 then in curTmp3 the field is
N(11,0).
> 
> This I thought was odd 555.355 for row "C" is 555.36 and I cannot enter 
> three decimal places in the table, is this normal behavior? I do not
think I 
> have seen that before in my 15 years of using FoxPro.
> 
> CREATE CURSOR curTmp2(f1 C(1), f2 N(6,3))
> 
> INSERT INTO curTmp2 (F1,F2) values("C",555.355)

That's the way foxpro (may be also ancient dBase/foxbase) handles numeric
data 
when it exceeds the defined field size.
You insert a number that is larger than the definition allows, since it
has 7 
places. So foxpro stores the number and cuts (rounds) the decimal places
but 
keeps the places before the decimal point. If you
  INSERT INTO curTmp2 (F1,F2) values("C",-555.355)
then it would store -555.4
Other DB systems would throw an error in both cases.

Regards
Bernhard Sander
 




 11 Posts in Topic:
VFP9 SQL Query Column Width Bites Again!
Gene Wirchenko <genew@  2008-05-08 14:08:56 
Re: VFP9 SQL Query Column Width Bites Again!
"Dan Freeman" &  2008-05-08 14:17:31 
Re: VFP9 SQL Query Column Width Bites Again!
Jeroen van Kalken <I@[  2008-05-09 01:25:10 
Re: VFP9 SQL Query Column Width Bites Again!
Gene Wirchenko <genew@  2008-05-08 18:02:39 
Re: VFP9 SQL Query Column Width Bites Again!
"Stefan Wuebbe"  2008-05-09 07:47:48 
Re: VFP9 SQL Query Column Width Bites Again!
Rush Strong <rpstrong@  2008-05-09 14:56:19 
Re: VFP9 SQL Query Column Width Bites Again!
"Dan Freeman" &  2008-05-09 08:43:16 
Re: VFP9 SQL Query Column Width Bites Again!
"John Pugh" <  2008-05-09 09:11:18 
Re: VFP9 SQL Query Column Width Bites Again!
"Tom Libby" <  2008-05-09 09:26:53 
Re: VFP9 SQL Query Column Width Bites Again!
Bernhard Sander <fuchs  2008-05-09 17:11:17 
Re: VFP9 SQL Query Column Width Bites Again!
Rush Strong <rpstrong@  2008-05-09 15:25:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 7:47:58 CDT 2008.