Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Phantom records
Message
From
11/04/2008 02:16:46
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01309875
Message ID:
01309890
Views:
21
Hi Sergey,

Right!! mea culpa.. and thanks.
However, the STRTRAN(SUBSTR(TTOC(START),12,5),":"), while not as elegant or efficient as RIGHT(TTOC(start,1),6), should have worked.
Also, even though my time(start) yielded the wrong result, neither expression explains the phantom record phenomena to me.
As the time part was not essential, I removed it, and it seems to have resolved the issue. I was just curious as to whether anyone had a explanation for the phantom occurrence.

Rgds


>Please read my previous reply carefuly.
>
>>
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform