what would be the best way to create a Query builder in delphi?
I have devexpress quantum grid, so I can display data easily.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
At least as of a few years ago, best query building component for Delphi was “Simple Query”, an inexpensive component from a Russian toolmaker. Great component, features are much deeper and better thought out than they might at first appear. I used it with good success to integrate with data in QuantumGrid. (Since Simple Query merely generates an SQL string there isn’t really much to integrate that way. But I did also tailor the visual appearance so it looked consistent with the QG.) http://devtools.korzh.com/query-builder-delphi/
Note that the interface for Simple Query (and their “Easy Query” .NET component) is geared towards making it simple for users to generate valid searches without having any concept of tables, joins, or SQL. Takes a bit of foresight by developer to configure interface perfectly that way, but it’s a nice feature. Also can be used as “full strength” solution for database experts.
Also, I assume you’re aware that QG has its own integrated visual query system. I think my main problem with that was that it was mostly geared towards filtering the existing dataset, but in any case Simple Query was far more flexible.
Another thing, under the covers Simple Query has a number of objects that are used to generate the final SQL string, analogous to the code you posted and are asking about. Main purpose for this was just as intermediate stage between visual description and final output as SQL.