Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddProperty and Com.dll
Message
De
31/10/1998 13:46:45
 
 
À
30/10/1998 13:01:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00152924
Message ID:
00153195
Vues:
22
>I have a class that gets an ado record set and adds properties to itself depending on the fields contained in the RS. When the component runs from the form like this;
>
>SET CLASSLIB TO \oracledev\common\dataaccess\classes\databridge
>de = createobject("de")
>
>The properties are added and visible as de.propname etc.
>
>It does not work when
>
>the class is turned into a com.dll and called as follows:
>de = createobject("databridge.de")
>
>
>
>Can anyone help with this?
>
>Thanks,
>
>Michael
Michael:

I had a lot of trouble with this same sort of thing -- sharing the data component of a COM object. After several months (literally) talking to the MS help lines I learned the secret. It seems that you must expose a method in the COM object to return any of the data properties. Instead of:

de = createobject('databridge.de')
? de.propname

you need to:

de = createobject('databridge.de')
? de.returnprop(propname)

I hope this helps.

Rick Grinter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform