SQL query check

Posts   
 
    
Posts: 2
Joined: 10-Apr-2007
# Posted on: 10-Apr-2007 11:58:52   

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.

  1. Is the SQL in the code the same?
  2. How can i check the generated SQL-query?
Aurelien avatar
Aurelien
Support Team
Posts: 162
Joined: 28-Jun-2006
# Posted on: 10-Apr-2007 14:50:37   

Hi,

please see the Generated code - Troubleshooting and debugging page in the LLBLGen Pro documentation.

You should use the verbose level tracing.