Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CDX 101 question
Message
 
To
13/12/2011 14:58:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01530995
Message ID:
01531023
Views:
59
>Hey All
>
>We just ran a mass test on an application and we kept getting "Index file....\indvstats.cdx is corrupt, please rebuild index".
>
>My question is, what are the likely causes for this? We had, essentially, 20 machines banging on this file.
>
>The table in question has 4 fields, is indexed on one of them and has data being inserted into the table from this application
>
>The insert in question is:
>
> Insert Into indvstats (Scn, Idno, Resp, Key) ;
> Values (Alltrim(Str(StudentControlNum)), ReadTest.Idno, ;
> Iif(answer = 'A','1',Iif(answer = 'B', '2', Iif(answer = 'C','3','4'))),;
> Iif(ReadTest.Key = 'A','1',Iif(ReadTest.Key = 'B', '2',;
> iif(ReadTest.Key = 'C','3','4'))))
>
>
>Yes, this table is part of a container, but buffering is not turned on.
>
>Would someone be so kinds as to point me at all the other times this question has been answered, since I can't search?
>
>thanks

Are you setting sys(3052,1) and sys(3052,2) to TRUE?
In a heavy hitting multi-user application setting these to true ensures that the CDX gets properly updated in the correct order by locking it.

SYS(3052) - Override SET REPROCESS Locking

* Below is prevent corrupt data; get record locks on .dbf, .cdx, .fpt for updates
sys(3052,1,.t.)
sys(3052,2,.t.)
Previous
Reply
Map
View

Click here to load this message in the networking platform