----- Original Message -----
Sent: Tuesday, June 19, 2001 2:28
PM
Subject: RE: [DUG]: Use of TQuery's
Well, heres a start from someone not really in the
know either:
1) I have a query for each
sensible entity (Address, Contact mechanism, Bill, Job). That query has an
sqlstring.
2) Where there is an obvious
relationship between entities and if using dataaware controls I'll link child
queries to their parent with parametrised queries. Otherwise I might build an
sql string to represent the child.
3) I have one Utility query which
I create odds and sodds queries, such as for establishing if records exist/
dont exist etc.
Therefore ... a mix, the goal being ease of
maintaintenance, clear logic and not dragging too much data onto the client.
But, sometimes its easier to build queries in code - and more transparent so I
guess its horses for courses.
Hi
I'm about to embark on a conversion from Paradox to IB and
I have a question about common practice in terms of the use of TQuery's in
place of TTables.
My current app opens a TTable, for each Paradox table that
it uses, at startup and closes them all at closedown.
There appear to be 3 general ways that one can use
TQuery's:
1. Just like a TTable, with a Select * from MyTable
in the SQL property (at one extreme);
2. As a purely open Query with nothing in
either parameters or SQL, relying on code supplied by the app at
runtime. In this case one TQuery could be used to access several files
at different times.
3. With both SQL and parameters specified at design
time, in which case the TQuery is for a predetermined purpose ( and attached
to a specific file).
In the absence of ANY knowledge about what is normal, I'd
be grateful to hear of any general guidelines on what approaches are adopted
by those in the know.
TIA
Mark