Krummelz
asked on
EntityDataSource, Where clause, checking for null
I have an EntityDataSource on a web form. This datasource has a Where clause set to filter for certain records from my database. I've added another clause that checks for null values, but this does not work.
See my example code with the check for null added. It returns no records, but there are three such records that have the SourceType set to 'admin' and where the TargetID is null.
See my example code with the check for null added. It returns no records, but there are three such records that have the SourceType set to 'admin' and where the TargetID is null.
Where="(it.SourceType == 'Admin') && (it.TargetID == null)"
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
still get the same error..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the points. Really unexpected but much appreciated!
ASKER
" 'DBNull.value' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near multipart identifier, line 6, column 47. "