Board index » delphi » QBE maker in Delphi?

QBE maker in Delphi?

just curious, is there a facility in delphi that kinda simulates a
QBE-query maker that translates the graphical stuff into SQL code?

--
========================================================================
Leo G. Divinagracia III              |      ---   __o                  |
Magnetic Media Manipulator Spec.     |   ----   _`\<,_    Atlanta '96  |
ldivi...@barney.sbe.csuhayward.edu   |    ---  (*)/ (*)                |
California State University, Hayward |                                 |
School of Business and Economics     |      Going for the gold!!!      |
========================================================================

   WINDOWS 95 - brought to you by the same folks who gave us EDLIN...

 

Re:QBE maker in Delphi?


On Tue, 13 Feb 1996 21:06:12 -0800, "Leo G. Divinagracia III"

Quote
<ldivi...@barney.sbe.csuhayward.edu> wrote:
>just curious, is there a facility in delphi that kinda simulates a
>QBE-query maker that translates the graphical stuff into SQL code?

In the Client-server version of Delphi, there is a Visual Query Builder
(VQB). The VQB allows you to set up tables and relations visually, and then
translates the visual design representation into SQL. The produced SQL is
then automatically inserted into the SQL property of the TQuery component
from which the VQB was invoked.

The Database Desktop Utility (DBD) and has a visual design surface for
queries, ala Paradox for Windows. A menu option is available that opens
another window with the corresponding SQL. This SQL can then be copied and
pasted into the SQL property of a TQuery.

**************************************************************************
Steve Koterski                  "Results! Why, man, I have gotten a lot of
Product Group Manager           results. I know several thousand things
Delphi Technical Support        that won't work."
Borland International, Inc.                    -- Thomas Edison, 1847-1931

Re:QBE maker in Delphi?


On 15 Feb 96 03:04:02 -0800, WRIDD...@msn.com (W RIDDELL) wrote:

Quote
>To what extent does the BDE recognize QBE.  FOr example, visual dbase
>uses qbe with crystal reports.  Can these reports/queries be
>incorporated into a delphi app?

What is "QBE"? In different products and different contexts, it can mean
different things.

For example, in Visual dBASE a "QBE" is an ASCII file with a .QBE filename
extension that is a dBASE code representation of a visually designed query.
Because it is in dBASE code, such QBEs are usable only in Visual dBASE (or
some package capable of running dBASE program code, which does not include
Delphi).

Paradox creates a QBE file that is very different in nature. It is a binary
file that can be compared (on a very general way) to an SQL VIEW. These QBE
files can be used in a Delphi application the same way a .DBF or .DB table
would be used. That is, the TableName property of a TTable component might
be set to "NAMES.QBE" instead of a .DB table file.

The Database Desktop utility (DBD), being a very pared down copy of
Paradox, can also create these QBE files. And, the DBD is included with
Delphi.

**************************************************************************
Steve Koterski                  "Results! Why, man, I have gotten a lot of
Product Group Manager           results. I know several thousand things
Delphi Technical Support        that won't work."
Borland International, Inc.                    -- Thomas Edison, 1847-1931

Re:QBE maker in Delphi?


In article <z7XLxAA+8kIxE...@shockwav.demon.co.uk>,

Quote
Julian Bond <jul...@shockwav.demon.co.uk> wrote:
>I want to build the VQB into my app. Apart from licensing issues is
>there detail anywhere about the interfaces to VQBLIB.DLL

Check the Zac Delphi only tools catalog. There are a couple out there.

--
Salvatore Denaro                
s...@panix.com                    Spinning dreams with angel wings
Yes, I use PGP                     torn blue jeans/a foolish grin

Re:QBE maker in Delphi?


On 16 Feb 1996 02:23:37 GMT, pr...@BIX.com wrote:

Quote
>Steve Koterski wrote:

>>Paradox creates a QBE file that is very different in nature. It is a binary
>>file that can be compared (on a very general way) to an SQL VIEW. These QBE
>>files can be used in a Delphi application the same way a .DBF or .DB table
>>would be used. That is, the TableName property of a TTable component might
>>be set to "NAMES.QBE" instead of a .DB table file.

>>The Database Desktop utility (DBD), being a very pared down copy of
>>Paradox, can also create these QBE files. And, the DBD is included with
>>Delphi.

>Today I edited a dozen QBE files created with the Database Desktop that
>came with BDE 2.0.  They all look like this:

>Query
>ANSWER: :PRIV:OF34714.DBF

>TYPE: DBASE

>OF347.DBF | BLOCK10                            | GRANDTOTAL            |
>          | Check calc count all as Num Orders | calc sum as Total Amt |

>EndQuery

>I edited them successfully in Notepad, so I assume they are ASCII files.
>They don't fit any of the definitions provided, but are usable in at least
>the last three versions of Paradox and Database Desktop.  Wouldn't Delphi
>also be able to use them?

That's what I get for going by hearsay <grin>. The information I was given
was that they were binary files, and I did not verify that for myself.

Given that the file appears to be pure ASCII format and given a good
working knowledge of how these files are constructed, your information
should prove of value for someone who might need to programmatically tweak
this file, customizing the query.

**************************************************************************
Steve Koterski                  "Results! Why, man, I have gotten a lot of
Product Group Manager           results. I know several thousand things
Delphi Technical Support        that won't work."
Borland International, Inc.                    -- Thomas Edison, 1847-1931

Re:QBE maker in Delphi?


Steve:
    I asked a similar question recently that never got answered, but I
digress. My thought would be this. Is a TDBGrid (for example) that has a
tablename of Names.QBE, automatically read only? Do the rules of Paradox
"Live Query Views" apply here? I found something in the DB App Guide about
"Dynamic SQL" or "Live SQL" or something that sounded very similar to a
Live QBE. Are we talking about the same rules?
Brad Miller
Timeoil...@aol.com

Re:QBE maker in Delphi?


On 22 Feb 1996 13:07:07 -0500, timeoil...@aol.com (TimeOilMIS) wrote:

Quote
>    I asked a similar question recently that never got answered, but I
>digress. My thought would be this. Is a TDBGrid (for example) that has a
>tablename of Names.QBE, automatically read only? Do the rules of Paradox
>"Live Query Views" apply here? I found something in the DB App Guide about
>"Dynamic SQL" or "Live SQL" or something that sounded very similar to a
>Live QBE. Are we talking about the same rules?

Not sure how much (if at all) QBEs from the Database Desktop utility (DBD)
were tested for use under Delphi. The database access in Delphi is designed
primarily around direct access to tables and, when any SQL is to be done,
the TQuery component. That QBEs can be used at all in Delphi applications
may just be a quirk of the interaction between Delphi and the BDE.

At any rate, I have not yet seen a case where a QBE file used via the
TableName property of a TTable component has *not* been read-only. This
taking only the specifying of fields to use, and no filtering or ordering.
The CanModify property of the TTable component always ends up as False,
indicating a read-only data set that is beyond the reach of basic Delphi
database object properties to alter.

This is based only on the stock Delphi data set components, and does not
take into consideration that it may well be possible to create a custom
component that does fully accommodate QBE files in a read-write state.

**************************************************************************
Steve Koterski                  "Results! Why, man, I have gotten a lot of
Product Group Manager           results. I know several thousand things
Delphi Technical Support        that won't work."
Borland International, Inc.                    -- Thomas Edison, 1847-1931

Re:QBE maker in Delphi?


Hi !

There's a QBE component at several Delphi-related www sites.
Its freeware.
Filename: TQBE3.ZIP

Its very old (March-95) but works.

However, try to change from QBE to SQL. You'll have more chances in the
future.

Hope it helps !
David Berneda

Other Threads