Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Corrupt tables
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Corrupt tables
Miscellaneous
Thread ID:
00682928
Message ID:
00682928
Views:
59
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
Map
View

Click here to load this message in the networking platform