SubSonic Forums
All Your Database Are Belong To Us

How to Use "Like"

Latest post 08-21-2008 12:32 AM by ranomore. 7 replies.
  • 08-12-2008 7:43 AM

    How to Use "Like"

    Hi,

    I want to filter records that records starts with the letter a, b .......  or z depend on the user choice should show.

    but the problem is that i dont know that ho can i use "Like" operator in subsonic as we used in sqlserver.

    can anyone help me that how can i use it in subsonic.

    thx

  • 08-12-2008 8:21 AM In reply to

    Re: How to Use "Like"

    Subsonic.Select s = New SubsonicSelect();
    s.From(MyTable);
    s.Where("Column").Like(whatmyuserwants + "%");
    MyTableCollection c = s.ExecuteAsCollection<MyTableCollection>;

    Lots of syntax help at http://subsonicproject.com/2-1-pakala/subsonic-version-2-1-pakala-preview-the-new-query-tool/

     

  • 08-13-2008 1:53 AM In reply to

    Re: How to Use "Like"

    Heloo,

    Thx for reply but i could not find subsonc.select and i m using vb can you please  define it in vb thx.

  • 08-13-2008 2:07 AM In reply to

    Re: How to Use "Like"

    Dim s as New Subsonic.[Select]()
    s.From(MyTable)
    s.Where("Column").Like(whatmyuserwants & "%")
    Dim c as MyTableCollection = s.ExecuteAsCollection(of MyTableCollection)()

  • 08-13-2008 5:46 AM In reply to

    Re: How to Use "Like"

    Heloo dear,

    thx for reply.. when i use it like this it shows error that

    "subsonic.select type is not defined" any other idea plz thx

  • 08-13-2008 7:07 AM In reply to

    Re: How to Use "Like"

     I would recommend upgrading to Subsonic 2.1, it sounds like you are on 2.03.

     

  • 08-15-2008 12:38 AM In reply to

    Re: How to Use "Like"

    Hi Dear,

    Thanks i find the soloution in 2.1 now i need to know one thing that from where i can download subsonic CMS.

  • 08-21-2008 12:32 AM In reply to

    • ranomore
    • Top 10 Contributor
    • Joined on 11-05-2007
    • Salt Lake City
    • Posts 317

    Re: How to Use "Like"

    atifarif:

    Hi Dear,

    Thanks i find the soloution in 2.1 now i need to know one thing that from where i can download subsonic CMS.

    Really? You've been asking this question for five days now? It's honestly not that hard to figure out. Now, I'm sorry that I didn't answer this question on this thread when I read it the first time, but after a while, it gets kind of old. If you can't find a download link for the subsonic cms without someone typing it out for you, you're in the wrong business. It's been downloaded 20,000+ thousand times in the last year. Thank goodness most people were capable of finding it on their own.

Page 1 of 1 (8 items) | RSS