>>Help! I have a file that has a 25 digit customer id in it - clid
>>It has a billing date (a date field) - billdate
>>
>>I have an index - clid1 that is clid + dtoc(billdate)
>>I can reindex this file sometimes and everything works okay.
>>Then sometimes it will not find a record with this key. Has anyone
>>heard of a problem with dtoc() in a key, or Visual Foxpro 5.0
>>loosing indexes.
>>Any help is appreciated.
>>
>>Brad Trim
>>ssc@worldnet.att.net
>
>Hi Brad,
>
>DTOC() depends on your current date settings for output. My guess is that when you seek, you are not using the same date format that you used when you reindexed. When everything works fine, it's probably because you reindexed in the same date format.
>
>DTOC() should not be used for indexes because of that dependency. Use DTOS() instead, which always returns in the format yyyymmdd, no matter what your settings are.
PMFJI: I agree. Our most annoying Y2K conversion issue last summer was some truly stupid index tag definitions with DTOC() in them, which as you say is dependent on the setting of CENTURY. I strongly urge a rewrite to eliminate all use of DTOC() in any and all index definition(s) in your system.
Rob
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only