Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Phantom records
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
01309875
Message ID:
01309884
Vues:
16
Hi Sergey,

Thanks for the response.

I may have not explained the index expression clearly..
"Start" is a datetime field, time(start) returns a time string.
so my index expression actually was:
empno+dtos(date)+duty+time(start)

where:
empno is Char
date is date
duty is char
start is datetime

I also tried something more convoluted like:
empno+dtos(date)+duty+EMPNO+DTOS(DATE)+DUTY+EXCCODE+STRTRAN(SUBSTR(TTOC(START),12,5),":")
Which gave me the same result...
Seems that I get the phantom record problem whenever the time portion is added to the index:

DATE EMPNO DUTY START
03/29/2008 34381 PCC1 03/29/2008 15:00:00
03/29/2008 34381 PR3 03/29/2008 19:45:00
03/29/2008 34381 PR3 03/29/2008 19:45:00

The 3rd record is the phantom one. If I "set order to", the record disappears.
It also disappears when the index tag expression is rebuilt to exclude the time string.

aargh



>Expression time(start t) wll return current time with 2 digits after decimal point regardless of the value of 'start'. I don't think it was your intention. My guess is, you were looking for something like
>
>...+ RIGHT(TTOC(start,1),6)
>
>
>
>>This is just curiosity; I've got a workaround....
>>
>>One of my tables has an index tag based on:
>>EmployeeNumber C(5) + dtos(date d) + duty c(5) + time(start t)
>>
>>this configuration causes a phantom record to appear in a grid or a browse. The phantom record duplicates the preceding record, but cannot be selected, highlights even though the record mark is on the previous, selected record.
>>
>>Removing the time component from the index got rid of the problem, but I'd like to know why...
>>
>>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform