[AccessD] Puzzling error msg? <Invalid precision for decimal data type.>

John W. Colby jcolby at colbyconsulting.com
Tue Feb 18 22:25:00 CST 2003


Just off the top of my head... is that a long int trying to shoehorn into a
decimal?  If so, then the significant digits in front of (left of) the
decimal place may have too many digits.

Just a wag.

John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com]On Behalf Of Michael Maddison
Sent: Tuesday, February 18, 2003 10:50 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Puzzling error msg? <Invalid precision for decimal
data type.>


Hi List,

I've been beating my head against the wall for 24 hours now :-(
I'm getting the following error in my VB 6 project and I don't know
why...

<Invalid precision for decimal data type.>
<-2147467259>

I'm attempting to execute an Update sql string using the ado connection
object (I tried dao, it failed as well)
The query joins 2 saved queries, which are themselves the product of
table and query joins.  I cannot make major changes
to the underlying queries/tables as I am basically porting an Access db
to VB6.  (I didn't write any of the queries...
it all works fine in Access!  When I copy and paste the query into
access it runs with a problem)

I've checked all the data types, joins, casts (even added a Val())!!!  I
also cut 

I modified(below) the sql string to just open a recordset and it throws
the same error!

SELECT [queGetStands(1)].Period, [queGetStands(1)].CropType,
[queGetStands(1)].Forest, [queGetStands(1)].Compartment,
[queGetStands(1)].PatchNumber, [queGetStands(1)].Area,
[queGetStands(1)].StartDate, [queGetStands(1)].AgeClass,
[queGetStands(1)].Linkkey, [queGetStands(1)].SEASON, 
Val(CDbl(Fix([Pruned]*10+0.5*Sgn([Pruned]))/10)) AS Expr3, 
Val(CDbl(Fix([Large Sawlog]*10+0.5*Sgn([Large Sawlog]))/10)) AS Expr4, 
Val(CDbl(Fix([Medium Sawlog]*10+0.5*Sgn([Medium Sawlog]))/10)) AS Expr5,

Val(CDbl(Fix([Small Sawlog]*10+0.5*Sgn([Small Sawlog]))/10)) AS Expr6, 
Val(CDbl(Fix([Pulp]*10+0.5*Sgn([Pulp]))/10)) AS Expr7,
 [queGetStands(1)].YieldTable, 'C' AS Expr1, 0 AS Expr2
FROM [queGetStands(1)] INNER JOIN [queFOLPIOS(1)] ON
([queGetStands(1)].AgeClass = [queFOLPIOS(1)].Age) 
AND ([queGetStands(1)].YieldTable = [queFOLPIOS(1)].OSYieldTable)
WHERE ((([queGetStands(1)].Activity)='pulp'));

Has anyone come across this type of thing before????

Cheers

Michael M
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



----------------------------------------------------
Is email taking over your day?  Manage your time with eMailBoss.  
Try it free!  http://www.eMailBoss.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3100 bytes
Desc: not available
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030218/3e025ef9/attachment-0002.bin>


More information about the AccessD mailing list