Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add DataEnvironment in Form
Message
 
À
17/10/2001 22:49:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00570053
Message ID:
00570200
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform