Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optional parameters in VFP?
Message
 
 
À
15/04/2000 02:43:38
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Divers
Thread ID:
00359986
Message ID:
00360003
Vues:
13
This is very strange because VFP doesn't have an Optional keyword for parameter decalarations like VB. Try using MyData.Close() for your VB syntax. If that doesn't work, you may have to pass a logical False to the VFP function. Depending on how you coded it, it will think no parameters were passed and close all as you intended.

HTH.


>I trying to write a COM object in VFP that will expose its database functions to other languages like VB and VC. I seem to be doing well so far except when it comes to passing optional paramters. In VFP I do not receive an error if I use...
>
>MyData.Close()
>
>... this should close all open tables. But when I try to do the same in VB I get an error "Agrument not optional...". This is how I used the object in VB.
>
>Option Explicit
>Dim MyData as New VFPData
>
>Sub Form_Load()
> MyData.Open "D:\MyProgs\MyTable.DBF"
> ...
>End Sub
>
>Sub Form_UnLoad()
> MyData.Close && This is where the error happens since I did not
> pass an Alias name of an open table.
> ...
>End Sub
>
>Please e-mail me if you have a answer.
>
>Thanx! in adavance.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform