Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Table name and Field as a parameter
Message
From
30/10/1998 09:28:27
 
 
To
30/10/1998 09:19:02
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00152751
Message ID:
00152760
Views:
22
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform