Results 1 to 2 of 2

Thread: posted

  1. #1
    Join Date
    Dec 1969

    Default posted

    guys..sorry I posted this yesterday and I still can&#039;t figure it out.<BR><BR>This stored procedure takes two arugments from two form fields on the same page. <BR><BR>if request("Submit") &#060;&#062; "" then <BR>id = replace(request.form("idvalue"),"&#039;","&#039;&# 039;") <BR>searchVal = replace(request.form("txt_search"),"&#039;","&#039 ;&#039;") <BR><BR>cmdTemp.CommandType = adCmdStoredProc <BR>cmdTemp.CommandText = "sp_rv_GetMovieByTitle" <BR>cmdTemp.Parameters.Append cmdTemp.CreateParameter <BR><BR>("@store_number", adVarChar, adParamInput, 100, id) <BR>cmdTemp.Parameters.Append cmdTemp.CreateParameter <BR><BR>("@search_value", adVarChar, adParamInput, 100, searchVal) <BR>cmdTemp.CommandTimeout = 60 &#039;timeout in one minutes <BR><BR>Set rsCat = Server.CreateObject("ADODB.RecordSet") <BR>rsCat.CursorLocation = adUseClient <BR>rsCat.Open cmdTemp <BR><BR>Problem: When user first comes to this page, NO querystring values are present in the URL. When the above procedured is called then (eg.user enters values and submits values) it works fine. <BR><BR>However: The when user first comes to the page he/she also has the option to select a dropdown menu which onChange calls another stored procedure...the data can be paged (next / previous). <BR><BR>If the user page the data (from the second sp) and fills the url with querystrings; <BR>eg. store.asp?id=357&txt_category=1&CurPage=2 <BR><BR>then attempt to call the above stored procedure (by filling the form and submitting)...I get <BR><BR>"Procedure or function sp_rv_getMovieByTitle has too many arguments specified." <BR><BR>I don&#039;t understand this...why is the first stored procedure taking the querystings as values? or is it?

  2. #2
    Join Date
    Dec 1969

    Default It looks like you are passing a

    querystring variable called "txt_category" but you are looking for a querystring variable called "txt_search".<BR><BR>As an aside, you do not need a Command object to execute this stored proc because you are not returning any output parameters. <BR><BR>Just thought I&#039;d mention that. ; )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts