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:
01012010
Views:
21
Nancy,

I am sure that you have already found your answer. I am posting this code for the next person's benefit. Why Microsoft didn't have this in their sample code is beyond me. The following code is using the Microsoft Sample code. I edited it to make it work with a parameter.
DEFINE CLASS ShowCustomers AS Session OLEPUBLIC
   PROCEDURE GetCustomers (WhatCountry AS String) AS String
      LOCAL loXMLAdapter AS XMLAdapter
      LOCAL lcXMLCustomers AS String
       		
      loXMLAdapter = CREATEOBJECT("XMLAdapter")
      
      OPEN DATABASE "C:\Program Files\Microsoft Visual FoxPro 9\Samples\Northwind\northwind.dbc"

      USE customers
      SELECT * ;
         FROM customers ;
         WHERE country LIKE WhatCountry+"%" ;
         INTO CURSOR curCustomers

      loXMLAdapter.AddTableSchema("curCustomers")
      loXMLAdapter.UTF8Encoded = .T.
      loXMLAdapter.ToXML("lcXMLCustomers")

      CLOSE DATABASES ALL

      RETURN lcXMLCustomers
   ENDPROC
ENDDEFINE
Thanks,

Jim
James Harvey, MCP
Memphis Police Department
225 Channel Three DR
Memphis, TN 38103
901 577-1296
Previous
Reply
Map
View

Click here to load this message in the networking platform