Board index » delphi » One field, one record Paradox table okay?

One field, one record Paradox table okay?

I'm wanting to add a table that will just contain the version number of the
whole database of Paradox tables, so that some programs will terminate (or
ask for new database directory) at the beginning if they are pointed to a
too old database that is missing some expected fields and may have some
fields no longer expected.

Is it overkill to use a table to contain this number so that it can be
accessed by all programs that use the database?
--
Please respond only in the newsgroup.  I will not respond
to newsgroup messages by e-mail.

 

Re:One field, one record Paradox table okay?


"Mark Reichert" <m...@nospammessagelink.com> skrev i en meddelelse
news:3a6363e5$1_1@dnews...

Quote
> Is it overkill to use a table to contain this number so that it can be
> accessed by all programs that use the database?

You could also keep this number in a small textfile or inifile and place the
file in the same place as your tables.

Finn Tolderlund

Re:One field, one record Paradox table okay?


Certainly. There is nothing wrong with having a control table that has one
record and one or a few fields that contain configuration information. That
is a very commone technique. You could also use an INI file, although that
has no advantage other than being a bit smaller.

--
Bill

Re:One field, one record Paradox table okay?


I'm using this method to store many configuration that must be read by
multiple
software... instead of using IniFiles that are much easier to edit by the
user...
I even encrypt some data in this config.db

Re:One field, one record Paradox table okay?


Mark Reichert,

| I'm wanting to add a table that will just contain the version number of
the
| whole database of Paradox tables, so that some programs will terminate (or
| ask for new database directory) at the beginning if they are pointed to a
| too old database that is missing some expected fields and may have some
| fields no longer expected.
|
| Is it overkill to use a table to contain this number so that it can be
| accessed by all programs that use the database?
| --
| Please respond only in the newsgroup.  I will not respond
| to newsgroup messages by e-mail.

We use this strategy all the time.
I have a generic utility call pdoxtool.exe and it will traverse all of your
tables and compare them against a data dictionary, and if needed
restructure the tables accordingly.

I have another utility called dictmakr.exe and it allows you to add
tables to the dictionary by dragging and dropping dBASE or
Paradox tables. The utility allows you to provide a comment per field
and per file.

One of our major programs will check tables for bad indexes once
a day at startup. You could also consider scheduling this event at
night.

Garry Kernan

Re:One field, one record Paradox table okay?


Quote
> One of our major programs will check tables for bad indexes once
> a day at startup. You could also consider scheduling this event at
> night.

> Garry Kernan

How do you check indexes on the tables are bad without opening them and
having the program crash.

Thanks,

Ryan Kerr

Re:One field, one record Paradox table okay?


Quote
Mark Reichert wrote:

> I'm wanting to add a table that will just contain the version number of the
> whole database of Paradox tables, so that some programs will terminate (or
> ask for new database directory) at the beginning if they are pointed to a
> too old database that is missing some expected fields and may have some
> fields no longer expected.

> Is it overkill to use a table to contain this number so that it can be
> accessed by all programs that use the database?
> --
> Please respond only in the newsgroup.  I will not respond
> to newsgroup messages by e-mail.

I use a table called oddinfo.db which has the following fields:=
  oddinfoID:autoinc
  description:text
  Ainteger:integer
  Astring:text
  Adate:date etc.

Re:One field, one record Paradox table okay?


Ryan Kerr,

| How do you check indexes on the tables are bad without opening them and
| having the program crash.

You open tables and touch all the indexes inside try except and finally
blocks

Store info about which indexes are bad and then rebuild index - or table

Garry Kernan

Other Threads