>** 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 >>
>
>....
>lcXML = loShowCustomers.GetCustomersByCountry("Germany")
>....
>
>