Re: ASP - Stored Procedure best practice?
- From: "J" <IDontLikeSpam@xxxxxxxxxxx>
- Date: Fri, 19 Jan 2007 12:10:56 -0800
Hi Mike.
Do you know of a recommended method in doing this for a form with multiple
fields which allows a user to specify more criteria on multiple fields?
Seems like building the dynamic sql statement in the stored procedure with
the specified field parameters is the only method I can think of to do
multiple criteria searching but I guess I still would like to avoid.
Thanks for your info and reply. Much appreciated.
J
"Mike C#" <xyz@xxxxxxx> wrote in message
news:ee266d$OHHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
You can pass the comparison string in as a parameter in a parameterized
query. If you want a "wild-card search", just append '%' to the end of
the string before you pass it in. Also it's a good idea to *not* pre-pend
'%' to the front of the search string.
"J" <IDontLikeSpam@xxxxxxxxxxx> wrote in message
news:%23otfgI$OHHA.4484@xxxxxxxxxxxxxxxxxxxxxxx
Hello. I was wondering if anyone would recommend or point me to a best
practice method in programming a search field on an .asp page that calls
a SQL Server stored procedure to do 'LIKE' searches? The only method
that seems to accommodate this that comes to my mind as of now is using
dynamic sql in the stored procedure but hear that it's not good practice
using dynamic sql.
Thanks in advance.
J
.
- Follow-Ups:
- Re: ASP - Stored Procedure best practice?
- From: Erland Sommarskog
- Re: ASP - Stored Procedure best practice?
- References:
- ASP - Stored Procedure best practice?
- From: J
- Re: ASP - Stored Procedure best practice?
- From: Mike C#
- ASP - Stored Procedure best practice?
- Prev by Date: SQL cluster firewall question
- Next by Date: SQL password
- Previous by thread: Re: ASP - Stored Procedure best practice?
- Next by thread: Re: ASP - Stored Procedure best practice?
- Index(es):
Relevant Pages
|
|