Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
1 index in CDX not being updated during append
Message
From
05/04/2002 09:11:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00641324
Message ID:
00641386
Views:
13
>Hilmar
>
>My experience is that Sergey is always right. I will try ttoc(created,1) without really understanding why that should be the right answer.
>
>Thanks to both of you.
>
>Colin

Well, I would say the explanation is something like this:

ttoc() without a second parameter is designed for displaying data, not for indexing.

ttoc() with the second parameter is specifically designed for indexing: a) The return value has a consistent format, not dependent on SET DATE, etc., b) The return value will be sorted correctly, since the most significant datum comes first: year, month, day, hour, minutes, seconds.

In part (a), perhaps you are having trouble with private datasessions. Instead of solving this, just go ahead and use the second parameter for correct indexing.

BTH, for correctly indexing date-only fields, you can use dtos().

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform