Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Errors with Index tags
Message
De
15/11/2002 17:26:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00723415
Message ID:
00723479
Vues:
11
See below for questions/comments...

>Hi,
>
>My program is toremening users with errors like:
>
>Index tag is not found
>
>Structural .cdx file is missing
>
>Variable 'MYTAG' is not found
>
>This application makes a copy of the tables from a central location to the users folder, when he logs on. Each user is working on his own copy of the tables.
>
>This is how the files are copied:
>
><<
>
>Copy file (centralfiles) to (localfiles)

1. What is in "centralfiles" and "localfiles"? I assume it's something like: (mapped)"X:\central\*.*" and "C:\local\*.*".
*IF* that is the case then the only reason to do the subsequent stuff would be if the .CDXs are known to be bad in the first place. I also assume, if as above, that the centralfiles tables are NOT in USE anywhere.


>For I = 1 to NoOfTables
> Use TheTable
> Copy structure to (localfile) with cdx
>endfor

2. Assuming that "TheTable" is a variable being filled somewhere AND that you have only partial code shown here, won't this just OVERWRITE what you put there with COPY TO (first command)????

>
>* to ensure that the index is correct
>For I = 1 to NoOfTables
> select LocalTable
> Reindex
>endfor

3. Similar to #2 above.


>
>>>
>
>I would like to trap these errors in a error handler and work around it.
>
>Please verify this:
>
>"Variable 'MYTAG' is not found" - Does this always refer to index tags? This happens when the .cdx file is missing

I don't *think* so. It could be a regular variable, maybe even one IN a tag expression.

>"Index tag is not found" - indicates that there is an index file, but not the specified tag
>What is the difference between Structural .cdx file is missing & Variable 'MYTAG' is not found
>
>In all thses cases, shall I just recreate all the index tage for the table in question?

No. I'd say you don't really understand indexes or the .CDX usage by VFP.
Maybe if you show the REAL CODE and tell us WHY you code it like you do (tell us WHAT you think each command is going to do for you) someone can help. Also tell us the index definitions of each table involved.

good luck

>
>Thank you
>
>Ria
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform