Re: ASP - Stored Procedure best practice?
- From: "Mike C#" <xyz@xxxxxxx>
- Date: Fri, 19 Jan 2007 13:27:29 -0500
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:
- References:
- Prev by Date: ASP - Stored Procedure best practice?
- Next by Date: SQL cluster firewall question
- Previous by thread: ASP - Stored Procedure best practice?
- Next by thread: Re: ASP - Stored Procedure best practice?
- Index(es):
Relevant Pages
|