Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CDX missing
Message
 
À
27/05/2010 13:52:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01466267
Message ID:
01466297
Vues:
45
thanks al. It sounds suspiciously like the chr(0) problem since it only occurred on my computer when i imported the file.

So here is my first attempt to scan - which in fact catches one occurrence. I can replace it with " " but i would rather know what i am replacing and in whose record the chr(0) occurs. How would display the record and place using the following code: (or is there a better search code i can use) -tnx k
close all
cFile = Filetostr("C:\db\prg\menu\myfile.dbf") && Read file
For i = 0 To 1 && Loop through control characters
IF INLIST(i,0) && look for 0 character
WAIT WINDOW ' found here' 
LOOP  &&&  dont think i need this but i put it in anyway
ENDIF
ENDFOR
>>A new problem developed on one of our computers - a message flashed by that the .cdx of one of the main database tables could not be found. when i imported that file onto my home computer - i got the same message after a while.
>>i experimented with this and removed the cdx, when i restarted, the cdx was duplicated by the program.
>>
>>is there any cause for alarm - could this be a corrupted database table?
>
>Superficially it sounds like a problem with a corrupted CDX, not a corrupted table.
>
>In your experiment, you deleted the CDX, and it was automatically regenerated by the application? This does not happen by default, it sounds like you may have Stonefield Database Toolkit or some similar utility built in to your app. If that's the case, and the utility is rebuilding the CDX from scratch, that's probably the ideal scenario and you shouldn't have to worry about anything.
>
>There's another way to deal with CDX file corruption if you have a backup of the file (even if it's really old):
>
>- overwrite the corrupted one with the backup
>- open the table in VFP
>- issue REINDEX
>
>If problems with that particular CDX recur, then there could be corrupted data in the associated table (DBF or FPT) files. For example, sometimes CHR( 0 )s get introduced into tables by workstation crashes, network problems etc. Since CHR( 0 ) is sometimes used by the file system as an end-of-file marker this can cause problems. In that case you may need to scan the table files for CHR( 0 )s.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform