OpenAccess does not execute the query immediately in order to avoid loading the complete result set. The query is executed when you iterate over the result.
In order to execute the query you should do the following
- Obtain the query instance - IQuery query = scope.GetSqlQuery(createSQL.ToString(), null, null);
- Execute the query - IQueryResult res = query.Execute();
- Call res.Count. This will actually execute the query.
the Telerik team