Article ID: 133455
Article Last Modified on 2/15/2000
OPEN DATABASE C:\VFP\SAMPLES\DATA\TESTDATA.DBC
USE C:\VFP\SAMPLES\DATA\PRODUCTS.DBF
GO TOP && Start from the top
PUBLIC DIMENSION oMyStruct(10) && Define the array of structures
FOR i=1 to 10
oMyStruct(i)=CREATEOBJECT("sMyStruct")
oMyStruct(i).Product_Name=PRODUCTS.Prod_name
oMyStruct(i).Engineer_Name=PRODUCTS.Eng_name
oMyStruct(i).Cost_Per_Unit=PRODUCTS.Unit_cost
?oMyStruct(i).Product_Name
?oMyStruct(i).Engineer_Name
?oMyStruct(i).Cost_Per_Unit
SKIP
ENDFOR
DEFINE CLASS sMyStruct AS CUSTOM
Product_Name=''
Engineer_Name=''
Cost_Per_Unit=0
ENDDEFINE
Additional query words: struct VB VFoxWin
Keywords: KB133455