Run the following from the Command window with the user having the appropriate permissions.
NOTE: You need to provide the actual servername, user identification, and password for your installation of SQL Server.
nConnection = SQLSTRINGCONNECT("driver=SQL Server;Server=servername;UID=UserName;pwd=StrongPassword;database=Northwind")? SQLEXEC(nConnection, "select * from customers where customerid='CACTU' ;for xml auto,elements", "cust_xml")BROWSE NOWAITSQLDISCONNECT(nConnection)
After you run the code, the results appear in a cursor with one 255-character column. Because the size of this particular field is approximately 351 characters, Visual FoxPro should return the results to a memo field.