Provider error '8002000a'

Help, my websiite has started giving me the following errors -

"Provider error '8002000a'

Out of present range.

/scripts/vacancyview.asp, line 19 "


The file vacancyview.asp looks like so -

<%
Dim CMDVacancyView__AdvertID
CMDVacancyView__AdvertID = "0"
if(Request("ID") <> "") then CMDVacancyView__AdvertID = Request("ID")

Dim CMDVacancyView__SiteID
CMDVacancyView__SiteID = "0"
if(Session("SITEID") <> "") then CMDVacancyView__SiteID = Session("SITEID")

Dim CMDVacancyView__agent
CMDVacancyView__agent = "0"
if(Request.ServerVariables("HTTP_USER_AGENT") <> "") then CMDVacancyView__agent = Request.ServerVariables("HTTP_USER_AGENT")
%>
<%
set CMDVacancyView = Server.CreateObject("ADODB.Command")
CMDVacancyView.ActiveConnection = MM_recruta2_STRING
CMDVacancyView.CommandText = "dbo.usp_AdvertViews"
CMDVacancyView.Parameters.Append CMDVacancyView.CreateParameter("@RETURN_VALUE", 3, 4)
CMDVacancyView.Parameters.Append CMDVacancyView.CreateParameter("@AdvertID", 2, 1,8,CMDVacancyView__AdvertID)
CMDVacancyView.Parameters.Append CMDVacancyView.CreateParameter("@SiteID", 2, 1,5,CMDVacancyView__SiteID)
CMDVacancyView.Parameters.Append CMDVacancyView.CreateParameter("@agent", 200, 1,1000,CMDVacancyView__agent)
CMDVacancyView.CommandType = 4
CMDVacancyView.CommandTimeout = 0
CMDVacancyView.Prepared = true
CMDVacancyView.Execute()
%>

I have changed (CMDVacancyView.Parameters.Append CMDVacancyView.CreateParameter("@AdvertID", 2, 1,8,CMDVacancyView__AdvertID))  as before it read ("@AdvertID", 2, 1,5,CMDVacancyView)

The Stored Procedure looks like -

USE [JobBoardRegion]
GO

/****** Object:  StoredProcedure [dbo].[usp_AdvertViews]    Script Date: 04/07/2010 12:10:56 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO



ALTER PROCEDURE [dbo].[usp_AdvertViews]
@AdvertID int,
@SiteID int,
@agent nvarchar(1000)
 AS
DECLARE @views int;
 
IF (
@agent NOT LIKE '%Google%'
AND @agent NOT LIKE '%google%'
AND @agent NOT LIKE '%slurp%'
AND @agent NOT LIKE '%twiceler%'
AND @agent NOT LIKE '%msnbot%'
AND @agent NOT LIKE '%inspyder%'
AND @agent NOT LIKE '%baidu%'
AND @agent NOT LIKE '%BDFetch%'
AND @agent NOT LIKE '%bdbrandprotect%'
AND @agent NOT LIKE '%Feed%'
AND @agent NOT LIKE '%alexa%'
AND @agent NOT LIKE '%jobcrawler%'
AND @agent NOT LIKE '%wise-guys%'
AND @agent NOT LIKE '%tesco%'
AND @agent NOT LIKE '%Wanadoo%'
AND @agent NOT LIKE '%eSobiSubscriber%'
AND @agent NOT LIKE '%Jeeves%'
AND @agent NOT LIKE '%Jobrapido%'
AND @agent NOT LIKE '%spbot%'
AND @agent NOT LIKE '%trovitBot%'
AND @agent NOT LIKE '%twiceler%'
AND @agent NOT LIKE '%oodlebot%'
AND @agent NOT LIKE '%Pingdom%'
AND @agent NOT LIKE '%PostRank%'
AND @agent NOT LIKE '%R6_FeedFetcher%'
AND @agent NOT LIKE '%TwitterFeed%'
AND @agent NOT LIKE '%Wget%'
AND @agent NOT LIKE '%Yandex%'
AND @agent NOT LIKE '%SimpleFeed%'  
AND @agent IS NOT NULL)
BEGIN
SELECT @views=SUM(AdViews) +1
            FROM dbo.JBADView
            WHERE AdvertID = @AdvertID;
 
IF (@views IS NOT NULL)
    UPDATE dbo.JBADView
    SET AdViews = @views
    Where AdvertID = @AdvertID
ELSE
   INSERT INTO dbo.JBADView(AdvertID, SiteID, AdViews)
       VALUES(@AdvertID, @SiteID, 1)
END



GO



Again I have changed -

@AdvertID int,
@SiteID int,

As previously they were smallint..

Any thoughts here would be fantastic thankyou
garethtnashAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee SavidgeCommented:
What are the values of CMDVacancyView__AdvertID and CMDVacancyView__SiteID? I suspect one of those exceeds the integer limit for the sp.

Lee
0
garethtnashAuthor Commented:
The values are -
CMDVacancyView__SiteID = 30
 CMDVacancyView__AdvertID = 32791
the strange thing is that everything before 32759 (inc) works, everything afterwards fails
 
0
jerrypdCommented:
I am not positive, but I *think* you need to tell it that it is a stored procedure?
CMDVacancyView.CommandType = adCmdStoredProc which i believe is a 4

0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

garethtnashAuthor Commented:
It's been working fine up until now?
0
Lee SavidgeCommented:
What variable type is this: CMDVacancyView__AdvertID

Remember 16 bit integer values run from -32768 to 32767.

Lee
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
garethtnashAuthor Commented:
Thanks the table was expecting a SmallInt
0
Lee SavidgeCommented:
Glad to help.

Lee
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.