Doug Johnson-Cookloose
Doug Johnson-Cookloose

Reputation: 540

SQL Query builder in Delphi

I need to give users the ability to build a simple SQL query against our database. Our application is written in Delphi.

I am assuming only moderate levels of knowledge by the user, but they need the ability to build a simple select statement to be able to query against a couple of tables. If I can make this easy for them, that would be most wondrous.

Does anyone know of a tool or a set of components that I can use to help the users build SQL SELECT statements...

Upvotes: 3

Views: 9656

Answers (8)

Mohammed Nasman
Mohammed Nasman

Reputation: 11050

I think the most powerful one is ActiveQueryBuilder, which now included with Delphi IDE (Since 2007 I think)

alt text
(source: activequerybuilder.com)

Upvotes: 1

RRUZ
RRUZ

Reputation: 136401

Try EMS Advanced Query Builder.

is a powerful component suite for Borland® Delphi® and C++ Builder® intended for visual building SQL statements for the SELECT, INSERT, UPDATE and DELETE clauses. It allows you to build new queries visually and/or graphically represent the existing queries in your own applications. The suite includes components for working with standard SQL, MS SQL, InterBase/Firebird, MySQL, PostgreSQL and many more dialects. Advanced Query Builder enables users to make up large and complicated SQL queries with unions and subqueries for different servers without any knowledge of the SQL syntax.

alt text
(source: sqlmanager.net)

alt text
(source: sqlmanager.net)

Upvotes: 1

Kachwahed
Kachwahed

Reputation: 542

You may want to try this free builder:

GSC Visual Query Builder v.0.7

Visual Query Builder v.1.0

and some other in Torry: http://www.torry.net/pages.php?id=546

Upvotes: 0

RichardS
RichardS

Reputation: 536

TMS Query Studio? Good value at 75 Euro..

Upvotes: 1

GM Mugford
GM Mugford

Reputation: 211

I've used SimpleQuery for years and am quite happy with it. (http://devtools.korzh.com/eq/vcl/) It's not completely intuitive, but once you get the hang of it, you can present fields to the user from your database(s) and they can combine any series of them with ANDs and ORs to make very complex queries. You get a separate SQL window to save the resulting code. I make The resulting dataset available for printout with PrintDat! or to save as CSV data from the Woll2Woll Infopower grid that I use for display. I occasionally allow for XLS export too with XLSReadWrite. It's all quite automatic at this point. Just take the SimpleQuery example and mold that to your particular needs. You should be able to have something very usable in a day. There is a trial and an example free query builder standalone program that will give you an idea of the final look.

Upvotes: 1

Doug Johnson-Cookloose
Doug Johnson-Cookloose

Reputation: 540

I've come across FastQueryBuilder http://fast-report.com/en/products/visual-query-builder.html and OpenQueryBuilder http://fast-report.com/en/products/free-query-builder.html (apparently differing versions of the same tool) at Fast-Report. It looks like the right idea. Anyone have any experience with it?

Upvotes: 2

anon
anon

Reputation:

I've written a couple of similar things in Delphi. It's easy enough to allow the user to pick table and column names by querying the metadata and using lists and tree views for display. The difficulty comes when trying to implement things like joins. I've never come up with a good interface for this, and in my experience neither have many of the major data tools players.

Upvotes: 0

Phil Ross
Phil Ross

Reputation: 26100

I've used the DevExpress ExpressFilter control to allow users to specify SQL where constraints before.

Upvotes: 2

Related Questions