Delphi Database Access
Don't get me wrong, this is really easy ... BUT
I had a simple problem, I wanted to display an existing
Paradox table in a data grid.
Well, the help files just ran me around in circles.
However, the Database/Form Wizard... did exactly what I wanted.
After that, it was a simple matter to review the various
properties and see how it works.
Displaying a Single Table
The following was observed after running
the Database/Form Wizard...
- TTable
- DatabaseName
- Just type the path.
The help says that this should be the name of a
database component. There is no mention anywhere
that this property can accept a directory for Paradox files.
- TableName
- Name of the Paradox table
- Active
- The wizard set this false.
True allows you to see the data in design mode.
- MasterSource
- Used for Parent/Child relations.
MasterSource and DatabaseName are mutually exclusive -
only one may have a value.
- TDataSource
- DataSet
- Set this to the name of the TTable component.
- TDBGrid
- DataSource
- Set this to the name of the TDataSource component.
-
-
- TDBNavigator
- DataSource
- Set this to the name of the TDataSource component.
TDBGrid
The DBGrid allows
- The user can change both the column widths and their order.
- The contents of memo fields won't show.
- The default columns are ok.
But if you want to modify any properties, you must
use the Columns Editor.
Even this is a little limited - if you want to group
multiple fields under a single column,
then use TDBCtrlGrid.
-
TDBCtrlGrid
- The contents of memo fields will show.
- There is no default vertical scroll bar
- There is no way to set the panel height if Align
is other than alNone.
When Align=alLeft, the PanelHeight is ignored.
Therefore, the number of panels
is fixed and when the user re-sizes the form,
the panel height changes.
Author: Robert Clemenzi -
clemenzi@cpcug.org