Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do i pass a variable to a vfp 9 web service
Message
General information
Forum:
Visual FoxPro
Category:
Web Services
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
00997758
Message ID:
00997761
Views:
16
Thanks borislav. Your code makes sense but unfortunately does not work. I get an error "..incorrect number of parameters supplied for SOAP request..." This is the same error that i have been getting.

N.

>Try this:
>
>1. Change the code of CustomersInGermany :
>
>
>** Rename It to GetCustomersByCountry
>** Put a Parameter where You can pass a Country as a String
>
> PROCEDURE GetCustomersByCountry AS String
>      LPARAMETERS WhatCountry AS String
>
>      LOCAL loXMLAdapter AS XMLAdapter
>      LOCAL lcXMLCustomers AS String
>
>      loXMLAdapter = CREATEOBJECT("XMLAdapter")
>
>      OPEN DATABASE "C:\Program Files\Microsoft Visual FoxPro 8\" + ;
>                    "Samples\Northwind\northwind.dbc"
>
>      USE customers
>      SELECT * ;
>         FROM customers ;
>         WHERE country LIKE (WhatCountry+"%") ;  && Here is the change
>         INTO CURSOR curCustomers
>
>      loXMLAdapter.AddTableSchema("curCustomers")
>      loXMLAdapter.UTF8Encoded = .T.
>      loXMLAdapter.ToXML("lcXMLCustomers")
>
>      CLOSE DATABASES ALL
>
>      RETURN lcXMLCustomers
>   ENDPROC
>ENDDEFINE
>
>
>** Change The Example Code :
>
>
>
>....
>lcXML = loShowCustomers.GetCustomersByCountry("Germany")
>....
>
>
>Keep in mind this code is not tested
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform