CodeSmith Community
Your Code. Your Way. Faster!

Using T-SQL or ParameterBuilders?

Latest post 10-27-2006 4:07 PM by bsimser. 0 replies.
  • 10-27-2006 4:07 PM

    • bsimser
    • Top 200 Contributor
    • Joined on 02-14-2006
    • Calgary, Alberta
    • Posts 23
    • Points 845

    Using T-SQL or ParameterBuilders?

    I'm trying to figure out the right way to find text in my database. I have a column named "Description" and thought it would be nice to use the ParameterBuilder to construct it (rather than writing T-SQL). So I tried this:

    MyTableParameterBuilder query = new MyTableParameterBuilder();

    query.Append(MyTableColumn.Description, "%search term%", true); // ignore case

    Find(query);

    However this doesn't seem to work so I had to use:

    Find("Description LIKE %search term%");

    Am I using the parameter builder classes incorrectly or are they only for locating column values directly and not for text searches? 

     

    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems