Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: SQL
Expertise: Beginner
Apr 20, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning


Can I use more than one criteria in the QueryWhere("col1='val1'"&"col2='val2') to refresh a bound grid? I would really appreciate an answer or a solution; we are on the border line between tossing OPO and six weeks of work in favor of PowerBuilder 5.0, Delphi or maybe VB.

The QueryWhere() method takes a string that is the equivalent of the WHERE clause in an SQL statement. The QueryWhere() can take multiple conditions, the same as a WHERE clause, so you should have no problem.

The problem might be in your syntax. If you want to set the condition where col1 is equal to val1 and col2 is equal to val2, you should use the syntax

QueryWhere("col1 = 'val1' AND col2 = 'val2'")
This will work fine.

Also, make sure you use actual strings for the values, rather than trying to access the Value property directly.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date