I am using SqlServer Compact 3.5 (2008) and am trying to return rows that have a datetime field that is today or previous. This is the code I am trying, but it is throwing an exception. (in the Where clause)
I'm new to SQL so I'm having trouble with this one. Any ideas? If you need more data, let me know.
string selectStatement =
"SELECT * FROM EnglishSpanish ORDER BY AvgScore DESC " +
"WHERE NextShow <= @Today";
SqlCeCommand selectCommand = new SqlCeCommand(selectStatement, connection);
selectCommand.Parameters.AddWithValue("@Today", DateTime.Today);