VO DbServer:SetOrder Issue!
Posted: Thu Jan 30, 2020 5:22 am
Hi All,
All of a sudden the DBServer:SetOrder(cTag) is failing. I tried the code in another VO machine and it is not working there either.
If anyone can test and see if it works on your side. May be I am missing something obvious, but I just cannot see anything wrong with the code.
Please see attached Terminal app test which includes a sample DBF and a CDX.
BTW, the same DBF file and its CDX open fine in cmVODbx dbf manager app and I can see the tag and index expression. It works fine in X# sample app.
Environment: VO 2.8 SP4 (2838), Windows 10 Pro.
VO Code:
All of a sudden the DBServer:SetOrder(cTag) is failing. I tried the code in another VO machine and it is not working there either.
If anyone can test and see if it works on your side. May be I am missing something obvious, but I just cannot see anything wrong with the code.
Please see attached Terminal app test which includes a sample DBF and a CDX.
BTW, the same DBF file and its CDX open fine in cmVODbx dbf manager app and I can see the tag and index expression. It works fine in X# sample app.
Environment: VO 2.8 SP4 (2838), Windows 10 Pro.
VO Code:
Code: Select all
FUNCTION Start()
local ok as logic
local oDB as DbServer
SetAnsi(true)
SetInternational(#Windows)
RddSetDefault("DBFCDX")
RDDINFO(_SET_AUTOOPEN, true)
RDDINFO(_SET_AUTOORDER, 1)
oDB := DbServer{"c:testDbServerairline.dbf", true, false, "DBFCDX"}
AltD()
if oDB:Used // dbf opens and but in the VO Debuger the WorkAreas, the Current Order amd Current Index Expression are both showing as [b]n/a[/b] !!
ok := oDB:SetOrder("AIRLINE", "AIRLINE")
? "SetOrder Result: ", ok
oDB:Gotop()
? oDB:LastRec // return correct number of records.
IF !oDB:SetOrder("AIRLINE") // fails
? "SetOrder FAILED"
ELSE
? "ok"
ENDIF
oDB:Close()
endif
WAIT
RETURN NIL