Solved

Pervasive ODBC Client Interface Invalid precision value error

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
constraint check 2 56
SQL Querying data from 3 tables, all with 1 common column 4 51
return value based on substr 10 48
Dump data from mysql to xls php 10 20
Creating and Managing Databases with phpMyAdmin in cPanel.
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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…

756 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