The following code produces an exception in SQL CE.
CETestCollection coll = new CETestCollection();
int n = coll.GetDbCount();
I get the exception:
An exception was caught duting the execute of a retrieval query: There was an error parsing the query. [ Token line number = 1, Token line offset = 39, Token in error = SELECT ]. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.
Here is the sql it generated:
Query: SELECT COUNT(*) AS NumberOfRows FROM (SELECT \"CETest\".\"MyText\" FROM \"CETest\") TmpResult
My test table in SQL CE (CETest) has just a single field:
Column DataType Length AllowNulls Unique PrimaryKey
MyText ntext 16 Yes No No
Info:
SQL Compact Framework 2.0 SP1
LLBLGen Pro 2.0 Aug 3rd
Michael