Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detection of Numeric Overflow Error
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Detection of Numeric Overflow Error
Miscellaneous
Thread ID:
00709230
Message ID:
00709230
Views:
65
I have a table that has a numeric field in it (actually lots of tables with numeric fields).

ActChge N(6, 2)

Obviously the highest number that should be in this field is: 999.99

I am trying to come up with a way to programmatically interrogate the field size of the table, build the largest possible number then use that in a validation routine. The data is old in these tables. I am moving Data to SQL Server and need a routine to check for invalid data in numeric fields.

I am having a problem easily determining the # of decimal places in the field size as well as building the subsequent largest # with decimal places.

I.E.

nLargestPossiblNumber = GetLargestNumber('ActChg', 'table')
cField = 'Table.ActChg'
IF EVAL(cField) > nLargestPossibleNumber
** I have a problem with the data
ENDIF
What ben makes tracks for what wil be. Words in the air pirnt foot steps on the groun for us to put our feet in to.

Riddley Walker
Next
Reply
Map
View

Click here to load this message in the networking platform