Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index key build error in temp report
Message
De
04/05/2011 03:33:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01509359
Message ID:
01509364
Vues:
43
>>>I have some report generation code that has worked under VFP7 for years, but now gives me an "error building key for index [cdx filename] tag [tagname] under VFP9.
>>>
>>>the code pointed to in the debugger:
>>>index on iif(eof('PERSONEL'),EMPNO,PERSONEL.SNAME+PERSONEL.FNAME)+dtos(date)+DUTYTIME+EXCCODE tag REPORT
>>>
>>>If I suspend the program and then immediately resume, the error disappears. I assumed that it may have been an issue with data in memory not yet written to disk, so I added a flush command - no luck, neither did a wait statement.
>>>
>>>If I run the same process in VFP7 there is no error or issue.
>>>
>>>I'm using XP SP3, 2Gb RAM and a 2.7Ghz CPU.
>>>
>>>Any suggestions would be very welcome....
>>
>>VFP9 has a new SET TABLEVALIDATE setting. By default it's non-zero, and does some table checking that earlier versions do not. To see if this is the cause, you could issue SET TABLEVALIDATE TO 0 (zero) before running the suspect code.
>>
>>As a side issue, you're using a couple of reserved words in your INDEX statement:
>>
>>DTOS( date ) - implies you have a column named "date", not a good idea
>>TAG REPORT - "REPORT" is a reserved word, it's not a good idea to name an index tag after that
>
>Hi Al
>Thanks for the reply and solution, I can go to bed now :)
>That eliminated the error !!!
>And, I agree, I can change the tag name, but cannot change the field name "DATE" - However, it does not seem to have been the issue in this case.
>Thanks again!!!

You're welcome. However, if SET VALIDATE TO 0 eliminated the error, it implies there is subtle corruption in the table you're indexing, which probably should be dealt with sooner rather than later.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform