Link to home
Start Free TrialLog in
Avatar of Eric Sherman
Eric ShermanFlag for United States of America

asked on

Pervasive ODBC Client Interface Invalid precision value error

I have just started having this problem on some workstations running Access 2k.  I have an Access application that uses an ODBC connection (Pervasive SQL 2000) to some customer tables in an Accounting system.  There is a Make Table query in Access that creates a temporary table of data from one of the linked ODBC tables.  Recently, on some of the workstations whenever this query is executed I get the following error:

[Pervasive][Pervasive ODBC Client Interface] Invalid precision value (#0)

Other workstations in the same environment can run the query without getting the error.

Any ideas or help will be greatly appreciated.

Thanks
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Hmmm.... the first thing that I would look at - is the MDAC version the same on all of the machines having the problem, and is it different on the other machines.  A lot of MS products automatically update MDAC

Second: The Invalid Precision Value error can indicate a number of things.  In this case, it may indicate that the temp table that is created does not actually match the data sizes being returned for one or more columns.  Since this may be an infrequent error type (e.g. a City field defined as Length 15 in Access, 20 in Pervasive, but only a couple of cities with more than 15 characters in their names), it may look like it is only on some workstations because those stations access information related to the long-named city.

The definition of the tables (fieldnames can be obfuscated - types and sizes are important) would be helpful here.
Avatar of Eric Sherman

ASKER

Thanks bhess1,

The source table in the accounting system is very large (over 25 - 30 fields).  I did manage to isolate the problem down to the Pervasive ODBC driver though.  Rather than link to the tables, I imported the source table from the accounting application and it works fine on all workstations without any errors.  Bypassing the ODBC linked table confirms that the Visual Basic code is all OK and the problem is in the was Access reads the Numeric Decimal fields using the ODBC driver and that's what returning the Invalid Percision Value error.  Just haven't figured out how to fix it yet.

Much appreciated,

ET
ASKER CERTIFIED SOLUTION
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial