Hello
In one of my funktion i turn the index (descend) and now i found out , a seek doesnt find records when one is deleted.
Record 4669 is deleted but then comes 4 others . index expression is Id_Car+DatumC
Recall the deleted record and it finds the records.
Database and test program in the attachement.
Horst
Descend and deleted record
Descend and deleted record
- Attachments
-
- tmp.zip
- (243.75 KiB) Downloaded 97 times
Descend and deleted record
Horst,
you missed some parts - swisscode, QRReader and Excel.dll...
you missed some parts - swisscode, QRReader and Excel.dll...
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Descend and deleted record
Add
if i recall the deleted record (he is the first in the list) and i delete the second one it works normal
if i recall the deleted record (he is the first in the list) and i delete the second one it works normal
Descend and deleted record
Hello Karl
Its the last function SuchDescend () in the start.prg the rest u can delete
Sorry
Its the last function SuchDescend () in the start.prg the rest u can delete
Sorry
Descend and deleted record
So, now with the missing dll's
- Attachments
-
- tmp.zip
- (504.2 KiB) Downloaded 94 times
Descend and deleted record
OK. After removing the references, using statements, and most of the code - i can confirm, that it doesn't find the record with Descend, but finds it with normal sorting.
Checked with the latest version of 2.11.
Checked with the latest version of 2.11.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Descend and deleted record
HI Horst,
i seems the problem is that your first "002100000001636" record is marked as deleted. The results of my code below are:
setDeleted(false) --> car is found
setdeleted(true) --> car is not found
when you change in your code the setdeleted() setting from true to false do you see the same behaviour ?
btw. i´m using the Fox build 2.11.0.0
regards
Karl-Heinz
i seems the problem is that your first "002100000001636" record is marked as deleted. The results of my code below are:
setDeleted(false) --> car is found
setdeleted(true) --> car is not found
when you change in your code the setdeleted() setting from true to false do you see the same behaviour ?
btw. i´m using the Fox build 2.11.0.0
regards
Karl-Heinz
Code: Select all
FUNCTION TestDescend2() AS VOID
LOCAL odb AS DBServer
LOCAL cDBF, cPfad, cIndex AS STRING
RddSetDefault ( "DBFCDX" )
RddInfo ( _SET_AUTOOPEN , FALSE )
cPfad := "D:TEST"
cDBF := cPfad + "Arbeiten.dbf"
cIndex := cPfad + "Arbeiten.cdx"
odb := DBServer { cDBF } // ,TRUE,FALSE,"DBFCDX"}
? odb:SetIndex (cIndex)
? odb:SetOrder (1)
odb:orderDescend ( , , TRUE)
?
? "descend search with SetDeleted(true)"
SetDeleted ( TRUE )
IF odb:Seek ("002100000001636")
? "Car in Arbeiten gefunden:" //+cId_Car
ELSE
? "Car in Arbeiten NICHT gefunden:" //+cId_Car
ENDIF
?
? "descend search with SetDeleted(false)"
SetDeleted ( FALSE )
IF odb:Seek ("002100000001636")
? "Car in Arbeiten gefunden:" //+cId_Car
ELSE
? "Car in Arbeiten NICHT gefunden:" //+cId_Car
ENDIF
oDB:Close()
RETURN
Descend and deleted record
Horst,
I can't seem to be able to reproduce the problem. This means that either the problem is already fixed now in our current build, or I have
deleted too much code when trying to make the sample compile
Just to be sure we are on the same page, guys does the following code print false in your machines? (it prints true here):
I can't seem to be able to reproduce the problem. This means that either the problem is already fixed now in our current build, or I have
deleted too much code when trying to make the sample compile
Just to be sure we are on the same page, guys does the following code print false in your machines? (it prints true here):
Code: Select all
FUNCTION Start( ) AS VOID
SetAnsi (TRUE)
SetExclusive (FALSE)
SetDeleted (TRUE)
SetCollation (#CLIPPER)
SetInternational (#CLIPPER)
SetDateCountry (German)
SetCentury (TRUE)
SetDeleted (TRUE)
SetDecimalSep (Asc ("."))
SetThousandSep (Asc ("'"))
RddSetDefault ("DBFCDX")
SetNatDLL ("German.dll")
LOCAL odb AS DBServer
odb := DBServer {"C:...Arbeiten.dbf",TRUE,FALSE,"DBFCDX"}
odb:SetOrder (1)
odb:orderDescend ( , , TRUE)
? odb:Seek ("002100000001636")
DbCloseAll ()
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Descend and deleted record
Chris,
i get False, and true without the descend.
i get False, and true without the descend.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Descend and deleted record
Hi Karl,
Thanks! Can you please also try with today's beta build? Or are you already using that?
Thanks! Can you please also try with today's beta build? Or are you already using that?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu