>>>>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