In order to execute the first query you can call the Count
property of the query result:
IQueryResult result = scope.GetSqlQuery(“DO_IT”,
int a = result.Count;
//executes the query
The reason is that the query is not actually executed until the result is used.
On the other hand, the ExecuteDirect
method executes the query and does not return a result. In this case you should use the ExecuteDirect
without any parameters specified.
Hope that helps.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.