i'm getting closer to the source of this bug.
the index will start from the current record if the last movement in the
Area was a Seek.
it will start from the beginning of the file if the last movement was a
Skip.
Remember this only happens on a remote connection.
  
-----------
#INCLUDE "ads.ch"
PROC MAIN()
FIELD FLD1
LOCAL I
REQUEST ADS

//SET SERVER LOCAL
SET SERVER REMOTE
rddSetDefault( "ADSCDX" )
? "rdd:", rddSetDefault()
ERASE( "test.cdx" )

DBCREATE( "test.dbf", {{"FLD1", "N", 10 , 0}} )
USE test

? "connetion type:" ,ADSGETTABLECONTYPE()
INDEX ON FLD1 TAG TEMP
ORDSETFOCUS( "TEMP" )
? ORDSETFOCUS()
FOR I  := 1 TO 100
        APPEND BLANK
        FLD1 := I
NEXT

SEEK 50
SKIP 1 // <----- this line will cause the next index command to include
records 1-98 (should include only 51-98), comment it out and it will include
records 50-98 only.

ERASE("temp.cdx")
INDEX ON FLD1 TAG TEMP2 to temp.cdx WHILE FLD1 < 99 usecurrent

? ORDSETFOCUS()
? "===="
ORDSETFOCUS( "TEMP" )
? ORDSETFOCUS()
GO TOP
? FLD1
GO BOTTOM
? FLD1
ORDSETFOCUS( "TEMP2" )
? ORDSETFOCUS()
GO TOP
? FLD1
GO BOTTOM
? FLD1
USE
RETURN
-------------------



Przemyslaw Czerpak wrote:
> 
> On Fri, 17 Jul 2009, AbeB wrote:
>> Thanks Przemyslaw for looking into this with such detail.
>> Did you try it against a remote server?
> 
> I'm sorry but I do not have any so I cannot test it.
> 
>> What version of ads remote?
>> When I run it against ADS Version 7.1 the test result will be:
>> TEMP2
>>          1
>>         98
>>  ( I did not try your actual test, because I don't have a server avail
>> now)
>> it's very possible that it's a bug in ace32/ads and it's fixed it a later
>> version of ADS.
> 
> If you want to find the reason of problem it's important to make tests
> with exactly the same code and compare the whole output. I hope real
> ADS users can help you in such tests.
> If you made some tests before then I also suggests to change file names
> to eliminate all possible interactions with files on ADS server left
> by previous tests and which are reused accidentally.
> 
> best regards,
> Przemek
> _______________________________________________
> Harbour mailing list
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/problame-with-subindex---ads-remote-tp3265915p3415369.html
Sent from the harbour-devel mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to