Alex Rivera | Logout

.NET BindingSource Filter syntax reference

Asked 2009-09-07T15:15:28.877
9

You can use the Filter property of a BindingSource to do SQL like filtering. For example:

bindingSource.Filter= "Activated = 1"

Is there something like documentation on the exact syntax of this?

I would like to check if a field is not DBNull, so i tried "Field != NULL" but it gives a syntax error.

Edit
Report

2 Answers

4

Have a look at this msdn article. The described syntax should be valid for your BindingSource, too.

answered 2009-09-07T15:20:28.413
2

What worked for me was

bindingSource.Filter = "columnName Is Null";

or conversely

bindingSource.Filter = "columnName Is Not Null";
answered 2012-02-23T19:03:58.323

Your Answer