Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corrupt tables
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Corrupt tables
Divers
Thread ID:
00682928
Message ID:
00682928
Vues:
58
Hi,
My program uses a set of tables for reference. When the program starts the tables are copied from a folder to a second folder, and the program uses the table in the second folder. This is done so that if a change is made to the table it will be copied automatically.

But I noticed that queries on the table in the second folder gives wrong results. But if I reindex the table and try the queries again, they work!

What could be wrong. This is how the tables are copied:

m.ServerFiles = m.installfrom+"*.*"
m.PCFiles = m.installto+"*.*"
SET SAFETY OFF
CLOSE DATABASES ALL
COPY FILE (m.ServerFiles) TO (m.PCFiles)
SET SAFETY ON

** Recreate Tables
=CreateTables( m.InstallFrom , m.InstallTo )


*copy mytable

m.ServerFiles = m.installfrom+"mytable.dbf"
m.PCFiles = m.installto+"mytable.dbf"
SET SAFETY OFF
COPY FILE (m.ServerFiles) TO (m.PCFiles)
SET SAFETY ON

m.ServerFiles = m.installfrom+"mytable.CDX"
m.PCFiles = m.installto+"mytable.CDX"
SET SAFETY OFF
COPY FILE (m.ServerFiles) TO (m.PCFiles)
SET SAFETY ON

Thanks for any help.

Ria
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform