XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

XSharp.RDD.RddError - Exception at runtime with SET RELATION (VFP)

Open mattslay opened this issue 5 years ago • 6 comments

Using System
Using System.Collections.Generic
Using System.Linq
Using System.Text

Using XSharp.Core
Using XSharp.VFP
Using XSharp.RT
Using XSharp.RDD
#include "dbcmd.xh"
Function Start() As Void Strict
	
	Local oObject = myNS.MyFirstClass{} As MyFirstClass
	Field cType, cKey, cFkey, MoreData
	
	Select 0
	Use (oObject:cDbfName) Alias WA1 Shared
	Set Order To cKey
	
	Local cChildTable = "C:\Work\lm5\AppData\xSharp_Test_Child.dbf"
	Use (cChildTable) Alias WA2 New Shared
	Set Order To cFkey
	
	Select WA1
	Set Relation To cKey Into WA2
		
	Scan For cType = "I"
		? cKey
		? "  " + WA2->MoreData
	Endscan
	
	Wait

End Function

Begin Namespace myNS
	//==============================================================
	Define Public Class MyFirstClass As Custom

		Public cDbfName = "C:\Work\lm5\AppData\xSharp_Test_Parent.dbf"

	End Define

End Namespace

2019-10-21_5-48-17 xsharp_set_relation_dbfs.zip

mattslay avatar Oct 21 '19 10:10 mattslay