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 ENDDEFINEThanks,