-
80004005 scaling of decimal
Hi,
I am having problems running the following code:
'Here we determine the amount of tax to apply if the order is taxable.
SQLStmt = "SELECT Sum((TOTAL) * " & TaxAmt & " AS Tax "
'SQLStmt = "SELECT Sum((TOTAL) * .9999) AS Tax "
'SQLStmt = "SELECT Sum((TOTAL) * 1) AS Tax "
SQLStmt = SQLStmt & "FROM ORDERS WHERE "
SQLStmt = SQLStmt & " ORDER_ID = " & Session("ORDER_ID" & " "
Response.Write SQLStmt
Set RSTax = Connection.Execute(SQLStmt)
TaxAmt comes from a session variable.
If I substitute a number >=1 for "TaxAmt", the code functions(wrong
answer). If the TaxAmt is <1, as it is when using the "TaxAmt", I get the
following error:
SELECT Sum((TOTAL) * .9999) AS Tax FROM ORDERS WHERE ORDER_ID = 48
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Scaling of decimal value resulted
in data truncation.
/storeTest/order.asp, line 166
Does anyone have any ideas how to change the SQL call to make it work?
Thanks,
Kevin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|