Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The Decimal field's precision is too small... 1

Status
Not open for further replies.

simonj

MIS
Jan 14, 2002
6
0
0
GB
The Decimal field's precision is too small to accept the numeric you attempted to add."

Access2002
Merant 4.0 ODBC connection to Progress 8.3E
MSjet4.0 ver 4.0.8015.0

I get the above error when trying run a select statement within some VBA. This error occurs during the select phase before writing to a file.

any clues...

Thanks for your help.
 
Hello,

I am running a query in Access and am getting the same error. Any help would be appreciated.

Thanks!
 
I have had this problem, and I don't know of any solution. The real issue is that if there are any errors, the entire SLQ statement gets killed.

The way around it I have found is to read one record at a time using VBA and ignoring bad ones.

Are you using and ODBC Data source?

Ascii dumb question, get a dumb Ansi
 
Yep

ODBC linked data source.

Currently reading the query result into a recordset for writing to a file. You may be right that there is some problem data in a field causing the query to collapse.
 
If like me, you are not able to correct the data, then using vba to read one record at a time is your only option.

That way, the query doesn't fail, just the bad record fails.

I used an on error trap to set the value to some wierd number like -9999 so I could at least identify which record was the cause.

ChaZ

Ascii dumb question, get a dumb Ansi
 
The problem is caused by the translation of the numeric field definition from FoxPro to Access. Say the decimal field is defined in Fox as 10 characters with 3 decimal places. Fox does not include the decimal point in the 10 characters. When Access reads the table it takes the 10 characters with 3 decimals, but the decimal is included in the 10 characters. So if a number in the table is, say, 9999999.999, Access will not accept the value because it expects a maximum value of 999999.999. I have worked around the problem by changing the field definition in Fox to 11 characters with 3 decimals, then Access accepts the data. This might not be a good solution if a form or report is maxed out for 10.3, so be careful.

If anybody has a better solution let us know.
 
I am also having the same problem after upgrading to AcuODBC 6.01. Previously if there was "invalid" data in a numeric field it would default to zero. Now it gives me an #Error and return this message. This is a major problem because our vendor has files with multiple record layouts in them and if I don't choose my fields carefully I get this error. Sounds like there isn't any solution just tedious work arounds. Still looking for a better solution if anyone else has ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top