Was working on a project today and need to get information from the database based off of an already completed query. I first did it by making a routine to run the query and build the select with a customer where statement, but hitting the db 300-400 times per incident was being slow and ineffective. So, I decided to just cut that down to one query and use a select on the resulting datatable.
I would get the results in a datatable, and make my expression.
My criteria was for the account, which was a number, and SQL syntax would be account = 1234567
That kind of worked, but would throw this error...
Min (274) must be less than or equal to max (-1) in a Range object.
After searching Google, I came across this post, Simillar error.
That post said to single quote the qualifier. So, I rewrote the expression to be account = '1234567' and it works.