Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Distributing Table / Database Updates
Message
From
23/05/2004 22:05:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
23/05/2004 19:32:28
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00906350
Message ID:
00906362
Views:
17
>Multi-part Question:
>
>I have the following file types in my directory that stores databases/tables:
>
>.dbf, .cdx, .fpt, .dpc, .dct, .dcx, and one .idf
>
>The .dbf, .cdx, .fpt, and .idf files appear to be associated with the tables themselves. The .dpc, .dct, and .dcx appear to be associates to the database container.
>
>When I modify a view, table, or index, I am trying to figure out what files I am actually affecting.

When you modify a table, the affected files may include:

For the table itself:

.DBF (the main table)
.FPT (memo file - stores memo fields and general fields)
.CDX (index file)

All three files should have the same base name; only the extension should change.

If you index with the TO clause (instead of TAG), you can also have several files with an IDX extension. I don't recommend using these files, except for some temporary index, which will be deleted immediately. Therefore, there is no need to update them on the client site.

Also, if the table is in a database, the database files will be affected, for example:

MyDatabase.DBC
MyDatabase.DBX
MyDatabase.DCX

You might update the files on the client site with a program that does required changes programmatically, for example:
* Add a field to a table
ALTER TABLE ... ADD COLUMN
or:
* Add an index
USE MyTable
INDEX ON MyField TAG MyField
However, I find it better to use the following solution, which is more generic:

Have an empty copy of the database: keep all tables with zero records. This will be your official structure.

Have a copy with test data for your development machine, and another copy with "live" data for the client.

Any changes to the structure are done to the empty copy. Make a small program that loops through all the tables, and does an APPEND FROM for each table. Some temporary directories will be needed.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform