Q qsrtech Active Member Licensed User Longtime User Feb 20, 2013 #1 Hi, I need some help. I'm trying to set a classes Fields/properties by using a "string" vs the actual variable. I need to do this cause I have properties stored on a server DB that are linked to the variable's name. I'm trying to use this code: Code: Copy 'Note: 'AProperty/ASetting are strings retrieved through a DB 'Aproperty is a field in my class, I.E. Height, Width, etc... Dim r as Reflector r.Target=mySettings r.SetField2(AProperty,ASetting) 'no field in class error here What's the correct way to do this? Thanks! John
Hi, I need some help. I'm trying to set a classes Fields/properties by using a "string" vs the actual variable. I need to do this cause I have properties stored on a server DB that are linked to the variable's name. I'm trying to use this code: Code: Copy 'Note: 'AProperty/ASetting are strings retrieved through a DB 'Aproperty is a field in my class, I.E. Height, Width, etc... Dim r as Reflector r.Target=mySettings r.SetField2(AProperty,ASetting) 'no field in class error here What's the correct way to do this? Thanks! John
Erel B4X founder Staff member Licensed User Longtime User Feb 20, 2013 #2 It will be easier to create a method that converts the query result to a class instance (or a Map). Upvote 0