Menu

Simple Criteria Question

2004-09-29
2013-03-07
  • Nobody/Anonymous

    Whats wrong with this code?
    The SQL it generates does not have a FROM "table" in it.  All the columns are correct, the WHERE clause is correct, the word FROM is in the SQL but no table name.

    CRetrieveCriteria rc = null;
    CSortie sortie = null;
    CCursor cursor;
    CCriteriaCondition condition = null;

    sortie = new CSortie();
    rc = new CRetrieveCriteria();
    condition = new CCriteriaCondition();
    condition.ClassMap = sortie.getClassMap();
           
    condition.addSelectEqualTo("MissionID",1);
               
    rc.WhereCondition = condition;
    cursor = rc.perform(sortie);

     
    • Nobody/Anonymous

      you have to set the condition.Tables collection.
      add this line of code:

      condition = rc.Tables

       

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.