Reputation: 2069
I have a entitydatasource connecting to my database and I want to filter the results using the "Where" property. As a test I have the following:
it.CustomerID is not 6
And I get the following error:
The query syntax is not valid. Near term '6', line 6, column 25.
I guess what I'm typing in is wrong, but why?
Upvotes: 0
Views: 803
Reputation: 91
Remove 'is not' to != and make sure that we can't write any function on EntityDataSource like upper(), lower().. etc but you can do it as Linq query
Upvotes: 0
Reputation: 62
Usage of the "Where" property follows the Entity SQL language. So, i think that right syntax is:
it.CustomerID != 6
or
it.CustomerID <> 6
Entity SQL Reference - "Not Equal To" Operator: http://msdn.microsoft.com/en-us/library/vstudio/bb399278(v=vs.100).aspx
Upvotes: 0