Solved

Pervasive ODBC Client Interface Invalid precision value error

Posted on 2004-09-09
5
868 Views
Last Modified: 2013-12-25
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
0
Comment
Question by:Eric Sherman
  • 2
5 Comments
 
LVL 32

Expert Comment

by:bhess1
ID: 12114619
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.
0
 
LVL 19

Author Comment

by:Eric Sherman
ID: 12114804
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
0
 
LVL 32

Accepted Solution

by:
bhess1 earned 500 total points
ID: 12116556
This could be related to a definition problem, if the total number of digits is > 15 in the Numeric fields.  From the ODBC specifications:

Decimal:  Signed, exact, numeric value with a precision of at least p and scale s. (The maximum precision is driver-defined.)
(1 <= p <= 15; s <= p).[4]

Numeric:  Signed, exact, numeric value with a precision p and scale s (1 <= p <= 15; s <= p).[4]

[4]   SQL_DECIMAL and SQL_NUMERIC data types differ only in their precision. The precision of a DECIMAL(p,s) is an implementation-defined decimal precision that is no less than p, while the precision of a NUMERIC(p,s) is exactly equal to p.

If Access sometimes maps Decimal as Numeric, then it could have a precision problem if the decimal field is > 15 digits.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now