Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 311463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:55:38+00:00 2026-05-12T07:55:38+00:00

This is ADO in classic ASP. I have a stored procedure with a parameter

  • 0

This is ADO in classic ASP.

I have a stored procedure with a parameter @IsNew of type int.

I can call it via SQL:

EXEC    [dbo].[SearchVehicles]
    @WebsiteName = N'AMSVans',
    @SortOrder = N'Year DESC,Status ASC',
    @Statuses = N'Unsold',
    @IsNew = 1

And the return sets are exactly as expected.

However, when I attempt to use it in my web page:

cmd.CommandText = "AMSVans.dbo.SearchVehicles"
cmd.CommandType = adCmdStoredProc

cmd.Parameters.Append cmd.CreateParameter("@WebsiteName", adVarChar, , 75, "AMSVans")
cmd.Parameters.Append cmd.CreateParameter("@SortOrder", adVarChar, , 500, "Year DESC,Status ASC," + SortMethod)
cmd.Parameters.Append cmd.CreateParameter("@Statuses", adVarChar, , 500, Statuses)
cmd.Parameters.Append cmd.CreateParameter("@IsNew", adInteger, , 4,1)
cmd.Parameters.Append cmd.CreateParameter("@Categories", adVarChar, , 500, "AMS Vans")

Set r = cmd.Execute

I get back nothing. Nada. Zilch.

I’m not even sure where to begin debugging this one :-/

Update RE “Set nocount on”:

Interestingly, if I turn it off (ie, comment out that line), I get this error:

ADODB.Recordset error '800a0e78' 
Operation is not allowed when the object is closed. 
/pages/inventory/main.asp, line 109 

The line in question (r is the recordset):

if not (r.EOF and r.EOF) then invFound = true
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:55:38+00:00Added an answer on May 12, 2026 at 7:55 am

    If your stored procedure can produce multiple result sets (including intermediate results that aren’t intended for return) try setting nocount on at the beginning of the proc. Multiple results can cause problems for ado recordsets.

    e.g.

    Set NoCount On
    

    Also, if that doesn’t work, and you have changed the proc recently try running it from your page with different parameters so that you aren’t getting a cached result.

    Edit

    I notice you are specifying a length for the int parameter, that is only necessary for variable length types, and would normally default to 0, try omitting it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to convert some code from classic ASP to ASP.NET 1) How can
This past summer I was developing a basic ASP.NET/SQL Server CRUD app, and unit
I have a classic asp webpage written in vbscript that outputs the results from
I have a customer who's Classic ASP application is generating ASP_0147 errors. The first
ADO.NET has the notorious DataRow class which you cannot instantiate using new. This is
This is a bit of a long shot, but if anyone can figure it
This error just started popping up all over our site. Permission denied to call
I’m currently working on a classic ASP project talking to an Oracle database. I’m
I'm a former classic ASP programmer and sometimes PHP programmer writing my first ASP.NET
I've got the undoubted joy of having to put a very simple 'classic ASP'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.