CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Microsoft OLE DB Provider for SQL Server error '80004005' The precision is invalid.
- Article ID:
110 - Date Created
Friday, February 25, 2011 - Last Updated
Wednesday, June 20, 2012 - This Article Has been Viewed
2265 times - Short Desc
When inserting data to a Decimal Column within SQL Server, you may encounter this error. Microsoft OLE DB Provider for SQL Server error '80004005' - Details
This error will happen when you are trying to insert data into a SQL Server Column with data of type Decimal.
When you write your Parameter out using the adDecimal this error will accure.Microsoft OLE DB Provider for SQL Server error '80004005'
The precision is invalid.
/insert.asp, line 30 - Recreate Issue
To recreate this issue.<%
MyNum = "5.50"
sqlUser.Parameters.Append sqlUser.CreateParameter("@evUsername", adDecimal, adParamInput, 25, MyNum)
%> - Resolve Issue
To resolve this issue.
This is a work around to insert the Decimal values into your SQL Server Decinal Column.<%
MyNum = "5.50"
sqlUser.Parameters.Append sqlUser.CreateParameter("@evUsername", adVarChar, adParamInput, 25, MyNum)
%>
In the above code, we are substituting the adDecimal with adVarChar
This will allow for the Decimal number 5.50 to be inserted into our SQL Server Decimal Column.
Keep the column withing SQL Server as a Data type Decimal, that does not change.
This is only a work around, information on how to properly use the Decimal within SQL Server and your ASP Classic VBScript will be provided in a future update to this Article.
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19545
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16826