Solved

Pervasive ODBC Client Interface Invalid precision value error

Posted on 2004-09-09
5
880 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 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
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…

623 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