Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Index Error
Message
 
To
18/04/2013 09:37:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01571265
Message ID:
01571361
Views:
32
>>>I've never seen that before. Only on memo fields, or conditional IIF()s that were wrong.
>>
>>I ran it against my old EXE, that was compiled in VFP 8.0 SP1 and it ran fine.
>>Replacing the EXE with a newly compiled version in VFP 9.0 SP1, and it failed again.
>>Go back to the old version, it works. Back to the new it fails.
>>
>>So....... someting in VFP 9.0 SP1 fails in the Index Tag if you use DTOC against a
>>datetime field.... also, there is a built in filter with the tag too.... "status = 5" for the filter.
>>If it helps in understanding this error.
>>
>>So....... I have gone ahead and changed the index to get rid of the offending error.
>>
>>What do you think?
>
>
>I think it's weird. :-)
>
>I have not seen this issue previously, but I don't know if I've ever used DTOC() on datetime.
>
>I probably would've used:
>
SUBSTR(TTOC(ltWhatever),7,4) + LEFT(TTOC(ltWhatever),2) + SUBSTR(TTOC(ltWhatever),4,2)
>because I didn't know about the extra flag in TTOC() LOL! So, it likely would not have been an issue. :-)
>
>I am curious if you use:
>
INDEX ON LEFT(TTOC(ltWhatever),10) TO whatever.cdx TAG whatever FOR status = '5'
>if it does the same thing in VFP9SP1?

Yes, it worked with VFP 8.0 SP1 and VFP 9.0 SP1

Thanks!
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform