Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Table name and Field as a parameter
Message
De
30/10/1998 09:28:27
 
 
À
30/10/1998 09:19:02
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00152751
Message ID:
00152760
Vues:
23
>I am trying to convert a container into a class but I am not sure about how to make the table and field names as variables and pass table and field names as parameters from the calling program. Please HELP!!

Any class can accept parameters in its Init event. The calling program uses CreateObject to send the parameters:
Thisform.oContainer=createobject("MyContainer",Parm1,Parm2....)
So, you can send table/field name as Parm1,Parm2 here, e.g
Thisform.oContainer=createobject("MyContainer","mytable","myfield")
***Mycontainer.Init event
LPARAMETER cTablename,cFieldname
Select &cTablename.
IF &cTablename.&cFieldname=...
ELSE
ENDIF
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform