Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pervasive ODBC Client Interface Invalid precision value error

Posted on 2004-09-09
5
Medium Priority
?
889 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 32

Expert Comment

by:Brendt Hess
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:
Brendt Hess earned 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 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