Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement