Re: ASP - Stored Procedure best practice?



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





.



Relevant Pages

  • Re: ASP - Stored Procedure best practice?
    ... fields which allows a user to specify more criteria on multiple fields? ... multiple criteria searching but I guess I still would like to avoid. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.security)
  • Re: ASP - Stored Procedure best practice?
    ... fields which allows a user to specify more criteria on multiple fields? ... multiple criteria searching but I guess I still would like to avoid. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.security)
  • Re: ASP - Stored Procedure best practice?
    ... fields which allows a user to specify more criteria on multiple fields? ... multiple criteria searching but I guess I still would like to avoid. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.security)
  • Re: Word field Skip IF problem
    ... You can certainly make a field that SKIPs with multiple criteria, ... These are also the mergefields in my word docs. ... It basically says Skip record if "mergefield to" does not equal that ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Re: Outlook Express
    ... > Select the conditions for your rule by selecting the desired ... > check boxes ... > section to specify whether all of the rule conditions must be ... If you enter multiple people ...
    (microsoft.public.win2000.general)