Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access VFP COM array property from VB
Message
De
09/10/1999 11:02:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00274505
Message ID:
00274600
Vues:
32
In VB arrays are Zero Based... try accessing element [1,1] in VFP as [0,0] in VB.

BOb


>I'm having problems accessing a VFP COM array property from VB. Below is my small sample code:
>
>[VFP COM Server GetData method code]:
>THIS.aData[1,1] = 'TESTING 123'
>THIS.cData = THIS.aData[1,1]
>
>[VFP Client code:] This works!
>oComObject = CREATEOBJECT("VFPServer.GetData")
>oComObject.GetData
>? oComObject.aData[1,1]
>
>[VB Client code:]
>Dim varData,varData2 As Variant
>Dim oVFPServer As New GetData
>oVFPServer.GetData
>'this work
>varData = oVFPServer.cData
>'this doesn't work
>varData2 = oVFPServer.aData[1,1]
>
>The last line generates "Type mismatch error". Has anyone been able to successfully work with array (passing or accessing) between VFP and VB?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform