ASp.net stored procedures parameters for search functions

N

.Net Sports

I'm able to find info for using input parameters for stored procedures
to do inserts and update type SQL functions in asp.net (vb.net), but I
need to find something that will use input parameters with Select sql
statements to do search functions in an sql dbase and sql tables.
TIA
..NetSports
 
L

Lucas Tam

I
need to find something that will use input parameters with Select sql
statements to do search functions in an sql dbase and sql tables.

This all depends on how your stored procedure is written... and what you're
searching.

Also consider using Full Text Searching if you're doing alot of text
searches.
 
D

David Young

Using input parameters in a select command is no different than using them
in a update, insert or delete command. Then only thing that changes is your
sql query.

CREATE PROCEDURE dbo.mySelectStoredProcedure
(
@parameter1 varchar(10)
}
AS
SELECT * FROM MyTable where MYFIELD = @parameter1;

Then you create your command object, assign the parameter and it's value,
then execute the command.

Is that what you were looking for or am I just not getting your question.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top