Stored Procedure ASP
MyCommand.Parameters("firstletter") = "g"
I have a simple stored proc. It works fine if I hard code the input parameter. I want to pass the input from an input box on an html form to this parameter.
MyCommand.Parameters("firstletter") = 'whatever the user
'typed in the input box then hit the submit button I want it
'put here.
I tried creating a variable and assigning the input to the variable and then the parameter to the variable. Several variations of something like this:
request.form ('storedproc.htm") username, 1
This did not work. How do I assign the input to a variable and say that:
mycommand.parameters("firstletter") = variable
Thank you in advance!!!!!!!!!!!!!!
Peter J. Boettcher posted this at 14:07 — 22nd February 2001.
They have: 812 posts
Joined: Feb 2000
On whatever page is handling the form action you need to put:
variable = Request.Form("FieldName")
Then the variable should contain the input from the form field and you can use it in your stored proc.
PJ | Are we there yet?
pjboettcher.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.