General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only