If want this SQL query to be executed:
SELECT COUNT(endTime) AS filterHeeftDatum FROM antwoorden
- endTime is the Column
- antwoorden is the Table
As for the code i use this:
IPredicateExpression filterHeeftDatum = new PredicateExpression();
filterHeeftDatum.Add( new FieldCompareValuePredicate(AntwoordFields.EndTime, ComparisonOperator.NotEqual, null));
AntwoordCollection hasEndTime = new AntwoordCollection();
int aantalMetDatum = hasEndTime.GetDbCount(filterHeeftDatum);
As the query is executed, aantalMetDatum results in "0", while there a at least 4 rows with a value in the endTime column.
So i guess the generated code, the SQL-query, is wrong, but dont know where.
- Is the SQL in the code the same?
- How can i check the generated SQL-query?