KB Issue
In ASP Classic, using Parameterized Queries and the Integer, BigInt, SmallInt, TinyInt, knowing which value to use, will help you from experiencing the Out of present range Error.
Issue Details
When working with Parameterized Queries, knowing the difference between an Integer
Copy
Search Site
Search Google
, BigInt
Copy
Search Site
Search Google
, SmallInt
Copy
Search Site
Search Google
, and TinyInt
Copy
Search Site
Search Google
makes a huge difference in controlling errors in your code.
This error will occur if you use adInteger
Copy
Search Site
Search Google
instead of adBigInt
Copy
Search Site
Search Google
When your column's Data Type is set to BigInt
Copy
Search Site
Search Google


Provider error '8002000a'
Out of present range.
/Header.asp, line 147
Recreate Issue[p]With the Data Type = BigInt
Using the following Parameterized Query
Copy
Search Site
Search Google
will throw an error.
[Classic ASP - adInteger as Data Type]
CFFCS | CarrzSynEdit: | ASP/VBScript
setActive.Parameters.Append setActive.CreateParameter("@Nums", adInteger, adParamInput, , randomNumber)

As you can see, we are using adInteger.
Resolve Issue
Using BigInt as our Data Type, we need to ensure it is used in our Parameterized Query, as shown here.
[Classic ASP - BigInt as Data Type]
CFFCS | CarrzSynEdit: | ASP/VBScript
setActive.Parameters.Append setActive.CreateParameter("@Nums", adBigInt, adParamInput, , randomNumber)