François,
Someone earlier gave you what could be a strong possibility. . . that you do *not* necessarily get a cursor with this type of SELECT.
Assuming VFP 5, try it with a NOFILTER clause and see if that changes things at all.
Good luck,
Jim N
>I tried what you told me but the result is always the same, RECCOUNT() returns 1 whereas _tally returns 0.
>
>There is something strange here. Sammie Simmons ran my code and didn't obtain the same result. Is this can be caused by special SET statements ?
>
>>Try moving ? _TALLY immediately after the SELECT.
>>
>>Prior to ?RECCOUNT(), do SELECT tmp.
>>
>>-myron kirby-
>>=======================
>>>Is there an explanation why RECCOUNT() doesn't return the right value in the following code ?
>>>
>>>
>>>create table t1 (f1 C(1))
>>>insert into t1 (f1) VALUES ("A")
>>>
>>>create table t2 (f1 C(1))
>>>insert into t2 (f1) VALUES ("B")
>>>index on f1 tag f1
>>>
>>>select "t1"
>>>scan
>>> SELECT * FROM t2 WHERE f1 = t1.f1 INTO CURSOR tmp
>>> ? reccount() && display 1
>>> ? _tally && display 0
>>>endscan
>>>
>>>
>>>RECCOUNT() returns 1 while it is supposed to return 0. This problem occurs only if you create an index on f1 in table t2. Without the index, it returns 0.
>>>
>>>Thanks.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only