Menu

Find Method

homer111
2005-03-05
2013-03-07
  • homer111

    homer111 - 2005-03-05

    i have a class with three independent codes. Depending on situation i need to search using one of the three. Could i use the Find method?
    Using Find:=True in attributes atoms generate a SQL with AND (p1 and p2 and p3).
    I need sometimes:
    select .. where p1=..
    others
    select ... where p2=..
    others
    select .. where p3=..

    Thanks

     
    • Richard Banks

      Richard Banks - 2005-03-07

      No.  The Find() method uses _all_ attributes that are flagged as find="true", not just some.

      You will need to use a CRetrieveCriteria and add a SelectEqualTo criteria to the WhereCondition, something like

      rc.WhereCondition.AddSelectEqualTo("myAttribute",myObj.Value)

      - Richard.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.