Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a Y2K problem?
Message
De
03/01/2000 11:58:35
 
 
À
03/01/2000 11:39:17
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00311693
Message ID:
00311731
Vues:
23
>>John-
>>
>>The more I look at the code, the more I'd like to know the value of the two variables when the error occurs. I suspect that will give you your answer.
>
>They are:
>
>lcFileName = '030PH38D'
>lcOrder = 'DESC'
>

You're running into the trap of misusing SYS(2015) - and then take a look at VFP's rules for valid name formation. VFP's parser expects names to start with an _ or alpha character; you can force past that with name expansion. Why it changed may be involved with how SYS(2015) operates - the value created is dependent on date and time, and as a result, it's probably forming the value differently because you crossed some arbitrary value. Look at SYS(2015) - it doew not return a valid name in the last 8 bytes of the 10 character string - it returns a valid 10 byte name. If your system can't deal with an LFN reliably, the substring of SYS(2015) in and of itself is not a valid means of forming a name.

This is a case where you got away with slop in the past and it bit you squarely on the buttocks. Be glad it didn't grab a more anterior location.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform