cannot read numeric value from a table 
Author Message
 cannot read numeric value from a table

I have an existing foxpro table with a column 'Balance' defined as
numeric with width 3 decimals.

When i open the table in foxpro, it gives me 4 decimals. When i click
on the field, it gives me 3 decimals.

Now in delphi i don't get to see anything at all. So all i get is an
empty field, in which i can input new data. I'm desperate, does anyone know how to solve this?

thanks
piet

table1.tabletype:=ttFoxpro;
table1.tablename:='J0022001.DBF';
table1.active:=true;
label1.caption:=floattostr(table1.findfield('BALANCE').asfloat)



Sat, 20 Mar 2004 01:28:40 GMT  
 cannot read numeric value from a table

Quote:

> I have an existing foxpro table with a column 'Balance' defined as
> numeric with width 3 decimals.

> When i open the table in foxpro, it gives me 4 decimals. When i click
> on the field, it gives me 3 decimals.

> Now in delphi i don't get to see anything at all. So all i get is an
> empty field, in which i can input new data. I'm desperate, does anyone know how to solve this?

I had problems with float fields in Delphi - expressions like
table.fieldbyname('somefield').asfloat occasionaly produced uncorrect
results, the only way to solve the problem is to use
table.fieldbyname('somefield').asstring and then convert string to
float.


Sat, 20 Mar 2004 14:09:54 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Aggregate functions on dBase tables with NULL numeric values

2. How to Read and write default values in Paradox table on runtime

3. Reading table values?

4. How to read a default value in a Paradox table on runtime

5. Fw: How to determine if a part of a string is a numeric value

6. Check for numeric values

7. Need help with type casting on numeric values from AVG aggregate functions

8. Invalid numeric value in a TDBEdit

9. Reading F11-F12, Numeric-5 keys in TP7

10. BDE: I cannot change the value in MSACCESS.dll32

11. Cannot Assign a Value to TBCDField

12. Table Locating with Paradox in a numeric field

 

 
Powered by phpBB® Forum Software