Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index Error -- Date constant VS date() function not the
Message
 
 
À
03/04/2001 14:55:42
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00491491
Message ID:
00493548
Vues:
22
According to MS KB article Q249336 index on str( {^2200-1-1} - EffDate, 5, 0 ) should work but it doesn't. It looks like a bug to me.

>Can someone with a better understanding point out to me what is occuring ? I'm running VPF 6, SP5 on Windows 2000 (no SP).
>
>My working assumptions:
> 1) Both {^2200-1-1} and date(2200,1,1) return a date value
> 2) A date value minus another date value yields a numeric result
>
>Issue:
>I do or do not get indexing error #114 depending upon:
> 1) the STRICTDATE setting
> 2) whether my index expression uses a date constant or the date() function.
>
>I looked but did not find any reference to this in the Microsoft Knowledge Base, is this a known issue? BTW, under the beta 1 of VFP 7 I do not seem get the error.
>
>Any ideas what's going on??? Thanks!
>
>
>*(Code to reproduces the above)
>*
>set strictdate to 2 && or to 1
>create cursor "TestOnly" ;
> ( Facility C(10), ;
> EffDate D )
>* Note: Adding a record at this point doesn't change the following
>
>? str( {^2200-1-1} - EffDate, 5, 0 ) && Correctly prints 0
>? {^2200-1-1} == date(2200,1,1) && Correctly prints .T.
>
>* Works:
>index on str( date(2200,1,1) - EffDate, 5, 0 ) ;
> tag "ByFacility"
>
>* But when STRICTDATE > 0, this generates error 114
>* "Index does not match the table. Delete the index file and re-create the index"
>index on str( {^2200-1-1} - EffDate, 5, 0 ) ;
> tag "ByFacility"
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform