SP parameter question

Results 1 to 2 of 2

Thread: SP parameter question

  1. #1
    Join Date
    Dec 1969

    Default SP parameter question

    I need to pass a session variable and a querystring request into a stored procedure. The code I have right now for that is:<BR><BR>searchstr = Request.querystring("letter")<BR><BR>strSQL = "EXECUTE sp_get_people " + Session("OrganizationID") + "," + searchstr + " " <BR><BR>My problem is I don&#039;t know how to declare the querystring request inside the SP. The session variable is declared as: <BR><BR>@OrganizationID numeric(9)<BR><BR>and I don&#039;t know how to declare the querystring request:<BR><BR>@searchstr??????<BR><BR>Then my other stored procedure code has to include this new variable:<BR><BR>SELECT * FROM wherever<BR><BR>WHERE People.OrgID = @OrganizationID AND People.Lastname LIKE @searchstr<BR><BR>I am new to ASP and SQL and I am sure that this is a relatively easy question, I just haven&#039;t come across it yet. Any help would be greatly appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: SP parameter question

    generally you&#039;d declare it as a varchar<BR><BR>length depends...<BR><BR>j

Posting Permissions

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