Subsonic operation - bit in Where section
Must declare scalar variable "@Deleted"
The second error will be caused by using logical deletes on the table you are querying (the table has an isDeleted or Deleted column).
But I'm going through the code, I'm not sure how this parameter gets there. The SqlQuery.GetRecordCount method does not call CheckLogicalDelete () from what I can tell. Is this error message related?
a source to share
It looks like a bug in the way SubSonic calls its parameters when generating the SQL to be executed.
What happens is SubSonic looks for "Type and 1" and then creates a comparison parameter named @Type & 10, which is not a valid SQL parameter name. This way you will get the following SQL from the original query. You have to report the bug http://code.google.com/p/subsonicproject/
At the same time, you can work around the problem with an inline query:
a source to share