Help please!

  • Thread starter Thread starter Grant Boettcher via .NET 247
  • Start date Start date
G

Grant Boettcher via .NET 247

I have search results from a SQL query using three parameters @keyword, @groupData, @actionData. I want to display the results in a string "Your search for KEYWORD and GROUP and ACTION have returned the following:"
How do I set up my stored procedure to pass these? something like this? do I even need a stored procedure

CREATE PROCEDURE sp_ReturnKeywordGroupsAction
(
@keyword varchar(100),
@groupData varchar(100),
@actionData varchar(100),
)
AS
--check keyword
IF (@keyword <> '')

--check group
IF (@groupData <> '')

--check action
IF (@actionData <> '')

GO
 
You don't need a stored proc to do that. You have the values in your
ASP.NET app since you are passing them into the other stored proc. Just
print those values out after you get the results. If variable
persistence is an issue, you could store them in the state bag (ex.
ViewState["myString"] = "Your search for " + keyword + " and " + group
+ " and " + action;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top