Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom Data Session Class
Message
From
18/10/2001 12:40:34
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/10/2001 12:32:59
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00570332
Message ID:
00570344
Views:
22
>Hey all,
>
>I remember seeing a while back a simple class that would let you define
>your own object for data sessions as a non-visual class. Shame on me, I lost the code where I was using it and cant remember how to do it?
>
>I think I remember something about using a form object in it...
>
>Anybody knows where I saw this information? An article somewhere maybe?
>Or maybe someone remember how to do it?
>
>Thanks in advance
>
>Pascal

Pascal,
Was it this :)
set excl off
oForm = createobject('myForm')
oForm.Show
read events

define class myForm as Form
 procedure init
 	this.Addobject('Sess1','Session1')
	this.Addobject('Sess2','Session2')
 endproc
enddefine	


define class Session1 as Session
	Datasession = 2
	procedure init
		use customer
		use orders in 0 order cust_id
		select customer
		set relation to cust_id into orders
	endproc
enddefine

define class Session2 as Session
	Datasession = 2
	procedure init
		use employee
		use orders in 0 order emp_id
		select employee
		set relation to emp_id into orders
	endproc
enddefine
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform