Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index
Message
From
14/03/2007 16:34:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
14/03/2007 12:52:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Index
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01203424
Message ID:
01203679
Views:
13
>For me, the real reason not to use DTOC() is that it isn't accurate for sorting when multiple years are involved.

That, too. But whether this matter or not depends on what you use the index for: sorting, I frequently do with SELECT - SQL commands, just before running the report. The index might be used to ensure uniqueness, or to find data.

>As a practical matter, unless you are writing an international application, SET DATE won't change so you don't have to worry about getting different values on different runs. That also wouldn't lead to the problem when building the key. You'ld simply get a wrong result rather than an error.

Even if you program for a single country, you may want to give the user some control, e.g., SET SYSFORMATS.

>My guess is that the error happened because SET CENTURY changed between the time the index was built and the record was added. DTOC() now returns a different length value and the index can't accept it.

Quite possible. I am not sure, though.
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
Reply
Map
View

Click here to load this message in the networking platform