Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add object dataenvironment to object form
Message
From
19/10/2006 15:14:45
 
 
To
18/10/2006 10:23:55
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01162708
Message ID:
01163444
Views:
18
This message has been marked as the solution to the initial question of the thread.
>>>>Hi..
>>>>
>>>>Is it possible to programactly add dataenvironment to a form object? If so, samples please..
>>>
>>>Thread #1161424 wasn't that long ago.
>>
>>ok.. thanks Dragan.. I didn't see because I've been out from UT for a period.. And there was a long, long time that expired my premier membership..
>>
>>I did the drag&drop issue.. but, that intuitive interface (of cursor/views/relations) did not work exactly as an usual form.. I'll try to do that programactly..
>
>For a DE, I think you can use the export from class browser as the program, so you don't have to write that code, just save the export and you'll have your DE in a prg.
>
>Alternately, if your DE is already in a vcx, you can just instantiate it in the .load -- didn't play with that, though, my forms don't have DEs at all.

on my own preferences I also dont want to use DE.. But, to follow our company's standard code for open local tables.. I needed to create this one
procedure dataenvironment.init
With This
	.AutoCloseTables             = .f.
	.AutoOpenTables              = .f.
	.AddObject("cursor1", "cursor")
	.cursor1.alias               = "mytable1"
	.cursor1.cursorSource        = "mytable1.dbf"
	.AddObject("cursor2", "cursor")
	.cursor2.alias               = "mytable2"
	.cursor2.cursorSource        = "mytable2.dbf"
	.AddObject("cursor3", "cursor")
	.cursor3.alias               = "mytable3"
	.cursor3.cursorSource        = "mytable3.dbf"
Endwith

thisform.oTables.goopen()
Thanks for your help Dragan..

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform