Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add DataEnvironment in Form
Message
 
To
17/10/2001 22:49:07
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00570053
Message ID:
00570200
Views:
24
>In form, I normally add tables from dataenvironment designer. I have created cursor and dataevironment classes. How do I add them in form? I tried with addobject with no success.
>
>Any help would be appreciated.
>
>Manoj

This worked for me

To create the DE object:

Thisform.Addproperty("oDataenv", Createobject("Loadtables"))

and to load the tables:

This.oDataenv.AddObject("myAlias", "Cursor")
With This.DataEnvironment.myAlias
.Alias = "myTable"
.CursorSource = "mrn.dbf"
EndWith
This.oDataenv.OpenTables()


I added this code in the form's init event. Remember to set autoopentables property to .f.


Enmanuel
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform