Re: Data sorting for print job
- From: "Guillem" <guillemvicens-nospam@xxxxxxxxxxxxxxxxxx>
- Date: 25 Jul 2006 05:33:30 -0700
Lorne wrote:
I want to print 6 pieces of information for each of several hundred
or more objects and allow the user to specify the order they are
printed by selecting one, two or three out of three of these pieces
of info to sort by.
Hence if they pick the second data field then it will sort on this
field before printing, but if they pick the 3rd field it will sort on
that field. All the sort fields are text info so will be sorted by
alphabet. If they pick 2 fields it sorts by the first then sub sorts
by the second. The sort fields are not unique so there maybe many
entries with the same data for 1, 2 or 3 out of the 6 fields.
check the Sort and Sorted properties for a TADODataset and descendants.
Although it is "designed" for desktop databases I would suggest to
avoid TADOTable as it has the nasty habit to try to load *all* the
records every time.
Also check DisableControls and EnableControls methods. While they are
designed to allow the programmer to disconnect/connect the dataset from
visual data-aware components (for example DBGrid) and speed it up, it
also speeds up the operations with a dataset even if it is not
connected to any such component.
1] is a database the best way or are there alternatives such as
creating my own record structure and sort routines? Note I do not
need user interface to data - I just run through the objects to
create a list with 6 entries per object, sort the list, print the
data then destroy the list. Nothing is visible to the user except a
print preview and an option to try again.
I would suggest not to reinvent the wheel. OTOH, if you have the
information in a database you can always expand your functionality in
an easier way than if you have to program all
2] If I use ADO can I be sure it will run on all Windows computers
post Windows 95 or do I need to distribute anything with my program
in case the users do not have database programs installed? I have
seen mention of distributing the ADO engine & DCOM95 separately and I
do not know what that involves.
see
http://msdn.microsoft.com/data/learning/MDAC/
3] Is there a better database solution than Access/ADO which I have
used once - the only experience I have on database use.
Access is not bad as a desktop database. Desktop database systems are
ok for small and/or simple databases for which you do not require to do
complicated things or high performance.
OTOH, relational database management systems (RDBMS) usually are more
powerful, are based on SQL, allow you to work with triggers, checks,
views, constraints, stored procedures, snapshots and a lot more
things,etc. Examples could be MS SQL, Firebird, Interbase, Oracle, DB2,
NexusDB, MySQL, etc.
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
.
- Follow-Ups:
- Re: Data sorting for print job
- From: Lorne
- Re: Data sorting for print job
- References:
- Data sorting for print job
- From: Lorne
- Data sorting for print job
- Prev by Date: Data sorting for print job
- Next by Date: Re: Data sorting for print job
- Previous by thread: Data sorting for print job
- Next by thread: Re: Data sorting for print job
- Index(es):
Relevant Pages
|