|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have the following ASP Code:
PHP Code:
I have the following Stored Procedure: PHP Code:
How do I make the multiple values get parsed correctly into the Stored procedure? I have tried the @ListingNumber= but i keep getting the Parameter Number 2 error and the @Name must come after the form. Any ideas from someone would be helpfull. |
|
#2
|
||||
|
||||
|
I would created a var for each 'MLS' and call the SP with 6 or whatever parameters. So just declare each value in the SP individually and then build it up in the IN() clause.
I can only assume that the command object thinks you are trying to pass multiple parameters when you are in fact only trying to pass one? HTH.
__________________
/* measure twice, cut once */ |
|
#3
|
|||
|
|||
|
I am actually trying to pass up to 6 mls #'s at once. However i tried building the var's up with the in() but got the parameter 5 and parameter 2 warning from sql that says I cannot pass the @var= after i have already called the first one in the form? I'm guessing maybe create an array or something? Thanks for the help!
|
|
#4
|
||||
|
||||
|
What I meant was create your SP to expect 6 parameters and pass the six parameters to it during the call.
PHP Code:
...and call it with somethng like... PHP Code:
One thing to note that I just thought of is that you are assigning values to the var @listingnumber as you are passing it to the SP. I think this will not work. You need to assign the values to vars then pass them in order as my example. HTH? |
|
#5
|
|||
|
|||
|
Thanks for the help. That should work. Always good to get a new head thinking about it. Sometimes you get too bogged down on the problem that you miss the obvious.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Using the IN Function with Stored procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|