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:
Classic ASP - Out of Present Range error
- Article ID:
7284 - Date Created
Monday, February 24, 2025 - Last Updated
Monday, February 24, 2025 - This Article Has been Viewed
12 times - Short Desc
When trying to input a value larger than the data type assigned, it will give you the Out of present range error. - Details
You may receive this error when the data you are trying to input into your database is much larger than the column you are sending it to.
This is because the INT Data Type only allows for 2 billion.
2,147,483,648 to 2,147,483,647
To where BIGINT will allow you up to nine quintillions
9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
The value presented to the statement is 27 billion, which is too large for our INT Column. - Recreate Issue
SQL Server Column Data Type = INT
Value = 27532622025
Set sqlHit = CreateObject("ADODB.Command")
sqlHit.ActiveConnection=siteconn
sqlHit.commandtext="insert into Hits (MyCol, UserIP, Hash, URL) values (?,?,?,?)"
sqlHit.Parameters.Append sqlHit.CreateParameter("@MyCol", 3, 1, , getIt)
sqlHit.Parameters.Append sqlHit.CreateParameter("@UserIP", 200, 1, 50, getIP)
sqlHit.Parameters.Append sqlHit.CreateParameter("@hash", 200, 1, 150, getHash)
sqlHit.execute
or
Set sqlHit = CreateObject("ADODB.Command")
sqlHit.ActiveConnection=siteconn
sqlHit.commandtext="insert into Hits (MyCol, UserIP, Hash, URL) values (?,?,?,?)"
sqlHit.Parameters.Append sqlHit.CreateParameter("@MyCol", adInteger, adParamInput, , getIt)
sqlHit.Parameters.Append sqlHit.CreateParameter("@UserIP", adVarchar, adParamInput, 50, getIP)
sqlHit.Parameters.Append sqlHit.CreateParameter("@hash", adVarchar, adParamInput, 150, getHash)
sqlHit.execute - Resolve Issue
SQL Server Column Data Type = BIGINT
Value = 27532622025
Changing our Data Type in our SQL Server Table from INT to BIGINT and then changing our code to match the change will allow us to input a larger number.
Set sqlHit = CreateObject("ADODB.Command")
sqlHit.ActiveConnection=siteconn
sqlHit.commandtext="insert into Hits (MyCol, UserIP, Hash, URL) values (?,?,?,?)"
sqlHit.Parameters.Append sqlHit.CreateParameter("@MyCol", 20, 1, , getIt)
sqlHit.Parameters.Append sqlHit.CreateParameter("@UserIP", 200, 1, 50, getIP)
sqlHit.Parameters.Append sqlHit.CreateParameter("@hash", 200, 1, 150, getHash)
sqlHit.execute
or
Set sqlHit = CreateObject("ADODB.Command")
sqlHit.ActiveConnection=siteconn
sqlHit.commandtext="insert into Hits (MyCol, UserIP, Hash, URL) values (?,?,?,?)"
sqlHit.Parameters.Append sqlHit.CreateParameter("@MyCol", adBigInt, adParamInput, , getIt)
sqlHit.Parameters.Append sqlHit.CreateParameter("@UserIP", adVarchar, adParamInput, 50, getIP)
sqlHit.Parameters.Append sqlHit.CreateParameter("@hash", adVarchar, adParamInput, 150, getHash)
sqlHit.execute






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 24855
- 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. 21571
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19712
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 18130
- The backup set holds a backup of a database other than the existing 17005