ADO RDD xHarbour

Re: ADO RDD xHarbour

Postby AHF » Thu Nov 05, 2015 3:25 pm

Gunther,

Right nevertheless that was a bug!

Is it still occur if you comment TESTADISC->(dbgoto(TESTADISC->(lastrec()+1))) //damit keine anzeige ?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Nov 05, 2015 3:31 pm

Antonio, no! If this line comment out is functioning!
But when i make a dbseek() with found()==.F. the recordpointer also go to lastrec()+1 and no moree seeks are possible!
ATTENTION: THIS BEHAVIOR ONLY IN SEEKS WITH UDF.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: ADO RDD xHarbour

Postby AHF » Thu Nov 05, 2015 4:16 pm

Gunther,

Please place a msginfo in ado.seek after ELSE //WITH :FILTER OR MOE THAN ONE FIELD and check if it is called.

You can place another one in the else for not softseek reporting npos.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Nov 05, 2015 4:37 pm

Please place a msginfo in ado.seek after ELSE //WITH :FILTER OR MOE THAN ONE FIELD and check if it is called.

Yes, is called
You can place another one in the else for not softseek reporting npos.

shows 0
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: ADO RDD xHarbour

Postby AHF » Thu Nov 05, 2015 5:03 pm

Code: Select all  Expand view  RUN
       
        IF nPos > 0
            oRS:BookMark :=  aWAData[ WA_ABOOKMARKS ][aWAData[WA_INDEXACTIVE]] [ npos ][ 1 ]

         ELSE
            oRs:MoveLast()
            oRs:MoveNext()

         ENDIF
 


If it gets here and is 0 then goes eof and !found.
Then the key is not in the array.

Are you trying both seeks with the same key ?
The first that works and the second?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Nov 05, 2015 5:34 pm

Antonio, on both no found()!
Conclusion: Always if i use dbsetorder() before dbseek() and the recordpointer is on lastrec()+1 and a UDF is in work the index is not functioning! :)
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: ADO RDD xHarbour

Postby AHF » Thu Nov 05, 2015 5:44 pm

So its a set order problem!
If you browse it is it ordered ok?

Place again a msginfo( len( aWAData[ WA_ABOOKMARKS ][aWAData[WA_INDEXACTIVE]] ) the same place as before and check if effectively has the index built.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Nov 05, 2015 6:09 pm

Gives 72 (the len of table).
Recordpointer stands on lastrec()+1 and the table is not indexed.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: ADO RDD xHarbour

Postby AHF » Thu Nov 05, 2015 6:54 pm

Try the same after dbsetorder and check with ordname and ordkey inyour app order is in fact active.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Nov 05, 2015 7:03 pm

Antonio, the name and the key is active!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: ADO RDD xHarbour

Postby AHF » Thu Nov 05, 2015 7:28 pm

Gunther

And the len of the array?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Nov 05, 2015 7:38 pm

Len of array is the len of the table!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: ADO RDD xHarbour

Postby AHF » Thu Nov 05, 2015 7:42 pm

Try this:

Code: Select all  Expand view  RUN

SET ADODBF TABLES INDEX LIST TO { {"AW2015",{"REV",'REV2TO2(REDATUM)'},{"RR","bu_korrindex(redatum,ideingdat)"},{"EW",'REV2TO2(REDATUM)'} } }
SET ADO INDEX UDFS TO {"IF","&","SUBSTR","SUBS","==","REV2TO2","REVEING","BU_KORRINDEX"}

//TESTADISC->(dbgoto(TESTADISC->(lastrec()+1)))  
TESTADISC->(dbsetorder(1))
BROWSE() //IS IT WELL ORDERED ?
GO TOP // TRY WITH AND WITHOUT THIS
BROWSE() //IS IT WELL ORDERED ?
TESTADISC->(dbseek("0227"))
MSGINFO( CVALTOCHAR(FOUND())+" "+CVALTOCHAR(EOF()) ) // .F. .T. ?
GO TOP
MSGINFO(RECNO())
DO WHILE !EOF()
     ? INDEXKEY(0) //DO YOU SEE THE KEYYOU ARE SEEKING?
      SKIP
ENDDO
 Browse()
 


Having the msginfo in ado_seek as previously.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Nov 05, 2015 8:01 pm

Antonio, the results:

Code: Select all  Expand view  RUN
//TESTADISC->(dbgoto(TESTADISC->(lastrec()+1)))
TESTADISC->(dbsetorder(1))
BROWSE() //IS IT WELL ORDERED ? -> ordered well
GO TOP // TRY WITH AND WITHOUT THIS //equal
BROWSE() //IS IT WELL ORDERED ? -> ordered well
TESTADISC->(dbseek("0227"))
MSGINFO( CVALTOCHAR(FOUND())+" "+CVALTOCHAR(EOF()) ) // .F. .T. ?    ->  .T. .F.
GO TOP
MSGINFO(RECNO()) // -> 1
DO WHILE !EOF()
      ? INDEXKEY(0) //DO YOU SEE THE KEYYOU ARE SEEKING? -> key is right
      SKIP
ENDDO
Browse() // ->  stands on lastrec()+1

Now the recordpointer is NOT on lastrecord()
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: ADO RDD xHarbour

Postby byte-one » Thu Nov 05, 2015 9:00 pm

Just a idea: should the lenght of bookmark-array have also reccount()+1?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 35 guests