Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pack corrupts database
Message
From
19/03/2005 00:00:05
 
 
To
18/03/2005 18:12:14
John Tomblin
Service Station Systems, Inc.
San Jose, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00997512
Message ID:
00997537
Views:
18
>I use a simple procedure to pack all tables in the database:
>
>open database v:\data\dlog3\DlogData exclusive
>TableCount = adbobjects(Tbls, "Table")
>
>for ctr = 1 to TableCount
> use Tbls[ctr] exclusive
> pack
>endfor
>
>When run from Foxpro (compiled into the exe), this works just fine.
>When run from the runtime most of the indexes are corrupted: left with 0 bytes and the tables cannot be opened again. "Index does not match... delete index file ..."
>
>I thought that this was probably something wrong in the DBC so, I created a new DBC, added all of the tables, added settings, stored procs, etc. Same results on the new database.
>
>Any ideas? Do others experience this? Is it a known bug? Is there a solution?

What version of VFP are you using?

Are you saying that you've created a program, PACKER.EXE and

1. If you run it from the Command Window (i.e. DO PACKER) it works fine;

2. If you run PACKER.EXE from, say, Windows Explorer it fails as you've specified?

Are you running both cases on the same computer, logged in as the same user with the same privileges? Is it possible you've bound a .DBC or table(s) into your .EXE? Have your tables always been in the same folder as the .DBC?
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform