Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing paramters to a web service
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
00799631
Message ID:
00799747
Vues:
23
This message has been marked as the solution to the initial question of the thread.
>I am getting an error when I try to pass a parameter to a method in an OLEPUBLIC class used as a web service. The error code is:
>
> "OLE error code: 0x80070057 The parameter is incorrect."
>
>The WS class method is simple:
>
>Procedure testparm
>
> Parameters cInStr
>
> Local cThisStr
>
> cThisStr = cInStr + " passed OK"
>
> Return cThisStr
>
>Endproc
>
>The call in the client code is:
>
>? x.testparm('Hello')


I had the same problem the parameter statement needs to be on the same line as the function
Instead of this
Procedure testparm
Parameters cInStr
do
PROCEDURE testparam (cInStr)

You also might want to type them if you are using VFP 8
PROCEDURE testparam (cInStr AS String) AS String
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform