VO DbServer:SetOrder Issue!

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
Jamal
Posts: 315
Joined: Mon Jul 03, 2017 7:02 pm

VO DbServer:SetOrder Issue!

Post by Jamal »

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:

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	
Attachments
testDBServer.zip
(53.85 KiB) Downloaded 56 times
testDBServer.zip
(53.83 KiB) Downloaded 52 times
testDBServer.zip
(53.83 KiB) Downloaded 51 times
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

VO DbServer:SetOrder Issue!

Post by Karl-Heinz »

Hi Jamal,

The problem is the !Deleted() For condition. Your cmVODbx and my DBMax knows this function, but your app doesn´t. The index is opened when i add :

EXTERNAL Deleted

to your aef.

regards
Karl-Heinz
Jamal
Posts: 315
Joined: Mon Jul 03, 2017 7:02 pm

VO DbServer:SetOrder Issue!

Post by Jamal »

Hi Karl,

Thanks a lot, that worked. I forgot that the EXTERNAL statement ever existed in VO!
So, I did a search in my VO repo, and found that In another app, I had ReportPro which the deleted function and many others like DTos were linked via rpForceLink().

Jamal
Post Reply