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);
you have to set the condition.Tables collection. add this line of code:
condition = rc.Tables
Log in to post a comment.
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);
you have to set the condition.Tables collection.
add this line of code:
condition = rc.Tables