RE: Invalid scale for DECIMAL datatype
Posted in 2004
Hi Sergei. Try as bellow. Change decimal(10) to decimal(10,0) OR Check "Describe Decimal Floating Point as SQL REA/ SQL DOUBLE" under Advanced of Informix ODBC Driver Setup. Hope this helps. -- Tsutomu Ogiwara from Tokyo Japan. ICQ#:168106592 >From: st@dhl.ru (Sergei Turin) >Reply-To: st@dhl.ru (Sergei Turin) >To: informix-list@iiug.org >Subject: Invalid scale for DECIMAL datatype >Date: 15 Sep 2004 01:30:26 -0700 > >Dear all, > >have anybody experienced the problem using Informix SDK 2.7 ? I'm >trying to attach Informix table to MS Access database with no success >in case of table with DECIMAL datatype. MS Access refuses to link the >table saying "Invalid scale for DECIMAL data type". Other SDK's and >tables work fine. > >The problem is mentioned in MS KB with recommendation to upgrade to >latest MDAC, MS Jet and Informix SDK. > >Unfortunately I cannot use SDK 2.8x due to problem with logon at >runtime. >I need ODBC driver to ask for password during connection to linked >tables. 2.8x stores passwords in ODBC DSN. In case of no password in >DSN, logon fails with "ODBC call failed" message. >If somebody knows how to restore old behaviour of SDK, it would be >great too. > >Software versions and environment settings follow. > >Thanks in advance and regards, >Sergei Turin > >******************************************************************************* > >Server >HP-UX 11.01 >Informix IDS 7.31UC6 > >Client >Windows XP SP1 >MS Access 2000 / 2003 SR1 >Informix SDK 2.70TC1 >Latest MDAC 2.7 SP1 and MS Jet 4.0 SP7 >IFX_USE_PREC_16=1 > >Table schema > >Columns types are : integer, decimal(10), varchar(40,0), char(1), >smallint, >float, datetime year to second > >Snippet from MS KB > ></START> >ACC2000: "Error 3701: 'Invalid Scale for Decimal Datatype'" Error >Message When You Try to Link an Informix Table to an Access Database >This article was previously published under Q319485 ></STOP> > >Snippet from I-SDK 2.70 ESQL/C release notes addendum > ></START> >Decimal precision for FLOAT and SMALLFLOAT conversions to DECIMAL data >type has been increased from 8 (SMALLFLOAT) and 16 (FLOAT) to 9 and >17, respectively. You might experience differences in decimal >precision after FLOAT/SMALLFLOAT to DECIMAL conversions. The functions >deccvflt() (SMALLFLOAT to DECIMAL conversion) and deccvdbl() (FLOAT to >DECIMAL conversion), which have converted float numbers to decimal >numbers with 8 digit and 16 digit precision, now have 9 digit and 17 >digit precision. >For more information on the impact and scope of this feature, refer to >the Release Notes file for this release of ESQL/C. The following >section describes the IFX_USE_PREC_16 environment variable, which >provides backward compatibility. > >1. IFX_USE_PREC_16 Environment Variable >A new environment variable IFX_USE_PREC_16 can be used to revert the >precision to 8/16 for all SMALLFLOAT/FLOAT to DECIMAL conversions by a >client ESQL/C program. Note that this environment variable affects the >client only and is not sent to the server. >When IFX_USE_PREC_16 is set to 1, a 9/17 client product will only use >8/16 precision to perform all SMALLFLOAT/FLOAT to DECIMAL conversions. > ></STOP> _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail sending to informix-list