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 6230273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:43:00+00:00 2026-05-24T09:43:00+00:00

I have an ASP page calling a stored procedure with returned values AND OUTPUT

  • 0

I have an ASP page calling a stored procedure with returned values AND OUTPUT parameters.

The output parameters aren’t displaying and I’m not understanding why:

<%
  dim Objrs, cmd
  set Objrs = Server.CreateObject("ADODB.RecordSet")
  set cmd = Server.CreateObject("ADODB.Command")
  set conn = Server.CreateObject("ADODB.Connection")
  conn.Open strConnect
  set cmd.ActiveConnection = conn
  cmd.CommandText="MKTG_Current"
  cmd.CommandType=adCmdStoredProc
  cmd.Parameters.Append cmd.CreateParameter("@added", 135, 2)
  cmd.Parameters.Append cmd.CreateParameter("@named", 200, 2, 50)

  set Objrs = cmd.Execute
%>
    </div>
    <div id="recent-news-box" class="rounded-corners-top dropshadow">
      <h3 class="border-dashed-b">Updated on: <%=Objrs.state%></h3>
      <div>
<%
    While Not Objrs.EOF
        Response.Write Objrs("Subject")
        Objrs.MoveNext
    Wend
  name_of_table = cmd.Parameters("@named").value
  added = cmd.Parameters("@added").value
  set cmd = nothing
  set Objrs = nothing
  conn.close
  set conn = nothing
        Response.Write name_of_table
        Response.Write added    
%>
          </div>
         </div>
      </div>

I’ve tried changing the position of the output items to no avail.

  • 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-24T09:43:02+00:00Added an answer on May 24, 2026 at 9:43 am

    There is some clunkiness because of the way ADO returns command results to both a recordset and as output paramaters.

    They are available after the returned recordset is closed, so this order should work:

      set Objrs = nothing
    
      name_of_table = cmd.Parameters("@named").value
      added = cmd.Parameters("@added").value
    
      set cmd = nothing
      conn.close
      set conn = nothing
    
      Response.Write name_of_table
      Response.Write added 
    

    An alternative is to leave the code as it is add switch to a client side cursor with:

      conn.Open strConnect
      conn.CursorLocation = 3 '//aduseclient
      set cmd.ActiveConnection = conn
    

    (Also check that your use of adCmdStoredProc should not be replaced with its numeric value if your not linked to a typelib)

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

Sidebar

Related Questions

I've been struggling all day calling a Stored Procedure from a classic ASP page.
I have ASP.NET page with an iframe on it for displaying some pdf reports
I have a ASP.NET page with an asp:button that is not visible. I can't
I am calling a Ajax call from my asp.net page. I have a combo
I have a generic method to call a stored Procedure in ASP.NET: public SqlDataReader
I have an ASP page which will query records from a DB Table and
I have an asp page in which the are number of listboxes.I want to
I have an asp page that loads a response user=exists everytime I try to
I have an ASP page which displays a text box when it loads. It
I have this serious: I have ASP.NET page, This page contents Update panel with

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.