Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add Properties to Scatter Name Object?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00516849
Message ID:
00516886
Vues:
17
Before I read your post (I'm still playing with this), I tried this and I almost get there:
Public oData
Select PreImport
oData = CreateObject("Record")
For nFld = 1 to FCount()
	oData.AddProperty(Field(nFld))
EndFor
oData.AddProperty( "BillCode" , "B")
oData.AddProperty( "Org_Unit" , "Unk   ")
oData.AddProperty( "OrigDate" , Date() )
oData.AddProperty( "OrigTime" ,Time() )
oData.AddProperty( "OrigAid" , "XXXX")
oData.AddProperty( "ModDate" , Date() )
oData.AddProperty( "ModTime" , Time() )
oData.AddProperty( "ModAid" , "XXXX")
Define Class Record as Custom
EndDefine
But my problem now is that I can't just "Scatter Name oData" because the object I just made gets obliterated. I think I will have to "Scatter Name oDataTemp" and then iterate through that, copying values from it to my oData object, and then "Gather Name oData" to my result table. Kind of kludgy. Is that the only way?


>This type of "object" does not have an AddProperty method. About the best you can do is create a custom class micmicking the object an pass the variable to it for assignment. Of note in this is that you can GATHER from such an object, and, if _Access methods are present for any of the table's field name in the object, they fire.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform