Thanks Przemyslaw for looking into this with such detail.

Did you try it against a remote server?

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.

thanks


Przemyslaw Czerpak wrote:
> 
> On Wed, 15 Jul 2009, AbeB wrote:
>> problem with subindex & ads remote(only)
>> #INCLUDE "ADS.CH"
>> PROC MAIN()
>> REQUEST ADS
>> SET SERVER REMOTE  // <<-will include the entire file in the 2nd index.
> 
> You are setting remote server.
> 
>> //SET SERVER LOCAL  // <<-will include the entire file in the 2nd index.
>> 
>> ERASE("TEST.CDX")
> 
> Now you are deleting local file.
> 
>> DBCREATE("TEST.DBF" ,{ {"FLD1", "N", 10 , 0 }} )
> 
> Now you are creatind TEST.DBF using DBFNTX.
> 
>> USE TEST VIA "ADS" EXCLU
> 
> Now you are reopening DBF using ADS RDD which is set to remote server.
> Which file do you open?
> 
>> INDEX ON FLD1  TAG TEMP
> 
> You are creating index on remote server.
> 
>> ORDSETFOCUS("TEMP")
>> FOR I  := 1 TO 100
>>      APPEND BLANK
>>      FIELD->FLD1 := I
>> NEXT
>> 
>> ERASE("TEMP2.IDX")
> 
> Again you are deleting local file
> 
>> GO TOP
>> SKIP 50
>> 
>> BROWSE()
> 
> Interaction. Bad idea because we do not know what you want to present
> and what is wrong.
> Results may depend on user keystrokes.
> 
>> INDEX ON FLD1 TAG TEMP2 WHILE FLD1 < 9999   TO TEMP2.IDX  
> 
> Yet another remote index with quite big range over last record value.
> 
>> ORDSETFOCUS( "TEMP2")
>> BROWSE()
> 
> Yet another interaction without information what is wrong.
> 
>> USE
>> QUIT
> 
> 
> I do not know what is wrong and what you want to show us.
> I modified your code to eliminate mixed native and ADS RDDs,
> switched to local server so FERASE() works on the same files,
> changed the range to test WHILE condition and eliminated
> user interactions so results can be easy compared.
> 
>    #INCLUDE "ads.ch"
>    PROC MAIN()
>    FIELD FLD1
>    LOCAL I
>    REQUEST ADS
>    SET SERVER LOCAL
>    rddSetDefault( "ADSCDX" )
>    ? "rdd:", rddSetDefault()
>    ERASE( "test.cdx" )
>    DBCREATE( "test.dbf", {{"FLD1", "N", 10 , 0}} )
>    USE test
>    INDEX ON FLD1 TAG TEMP
>    ORDSETFOCUS( "TEMP" )
>    ? ORDSETFOCUS()
>    FOR I  := 1 TO 100
>       APPEND BLANK
>       FLD1 := I
>    NEXT
>    ERASE("temp2.idx")
>    GO TOP
>    SKIP 50
>    INDEX ON FLD1 TAG TEMP2 WHILE FLD1 < 99 TO temp2.idx
>    ? ORDSETFOCUS()
>    ? "===="
>    ORDSETFOCUS( "TEMP" )
>    ? ORDSETFOCUS()
>    GO TOP
>    ? FLD1
>    GO BOTTOM
>    ? FLD1
>    ORDSETFOCUS( "TEMP2" )
>    ? ORDSETFOCUS()
>    GO TOP
>    ? FLD1
>    GO BOTTOM
>    ? FLD1
>    USE
>    RETURN
> 
> 
> 
> And it shows:
> rdd: ADSCDX
> TEMP
> TEMP2
> ====
> TEMP
>          1
>        100
> TEMP2
>         51
>         98
> 
> What is expected and the same as for native DBFCDX also in Clipper.
> I do not know what is wrong for you and what results you expected.
> 
> 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-tp3265915p3277805.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