Parameter names in HTML from Stored Procedure

Can I use that same HTML from Store Procedure multiple times on a page?

For example, if I had a SPROC with parameters A & B, is there a way to have a URL with ...A1=5&B1=8&A2=12&B2=47 ? if the page is calls the same HTML from stored procedure twice?

Are the parameters by name, or positional? or can I change the URL name to match the SPROC parameter name? I can wrap my SPROC in other SPROCs, just trying to make my SPROC more general.

Thanks,

Tom... 

Parents
No Data
Reply
  • There are a lot of questions in your post . Let me answer as many as I can:

    Can I use that same HTML from Store Procedure multiple times on a page? Yes

    For example, if I had a SPROC with parameters A & B, is there a way to have a URL with ...A1=5&B1=8&A2=12&B2=47 ? if the page is calls the same HTML from stored procedure twice? If i am understanding your question, the answer is "kind of". Your sproc would need to be able to handle every unique parameter name from the URL. Then you could use the Parameters setting of the individual HTM from sproc modules to limit them to only reading the particular parameters of interest.

    Are the parameters by name, or positional? or can I change the URL name to match the SPROC parameter name? Parameters are matched between URL and Parameters setting by name. The URL parameter name must be an exact string match to the value provided in the Parameters setting of the module, which must also be an exact match for a parameter in your sproc. To pass a parameter from the URL into your sproc, you need to call it out in the Parameters area as @parametername=; Every pieces is important. It must have the "@" in front, followed by an "=" with no value after (this is what tells it to read from the URL), and it must be closed out with a ";"

    Putting all that together with your example above, I would say to pull this off you would need to make your sproc accept parameters of A1,B1,A2,B2, etc. and be able to handle the different possibilities of data coming in with OR logic. Then you can set up your separate HTML from SPROC modules with the specific Parameters relative to each one. 

    I hope that makes sense. Good luck!

Children
No Data
More Content