[Mono-list] (generic)DataTable SELECT logic

Jan van der watt janvanderwatt at gmail.com
Wed Feb 10 05:07:46 EST 2010


Hi,

Please let me know if this should be posted to another forum.

Has anyone else seen that the DataTable.Select(filterExpression) produces a
funny when evaluating an expression that involves NULL, or is it just my
data/code gone wrong?

My code snippet is this:
DataTable lookup_value_schema_table = <an appropriate table>;
lookup_value_schema_table.Select("IsDeletedColumn<>0")

The dataset has either NULL or True in that column (but not False).

On MS .NET, only the rows with "True" are returned, but on Mono, ALL rows
are returned. It seems that the expression "NULL<>0" is FALSE on MS .NET,
but TRUE on Mono.

If I use:
lookup_value_schema_table.Select("IsDeletedColumn=True")
the results are as expected (i.e. only the rows with "True" in the column
are returned)

Thanks

Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20100210/40d73a99/attachment.html 


More information about the Mono-list mailing list