1 - submit the query
2 - retrieve the xml
3 - load the treeview
anything else I can do for you ;-)
The thing that you should watch out of is that VFP uses ODBC and ODBC only knows how to handle result sets. the XML that is returned by SQL Server is considered a stream. Since ODBC doesn't quite know how to handle it, it converts it to a result set. The result set has a single column that is 2033 characters long. The entire stream is returned, it's just broken up.
You'll have to iterate the result set to construct the full stream.
-Mike
>Can anyone explain the steps necessary to execute a spt from foxpro useing the for xml and then populate an xmltreeview control. I just playing around with the idea of displaying the information to the user and then thinking the treeview can drill down.
>
>Here is the basic query I am trying:
>
>
>SELECT dbo.patients.lastname, dbo.patients.firstname, dbo.meetings.begintime,
> dbo.meetings.endtime, dbo.meetproc.dcode, dbo.meetproc.description,
> dbo.meetproc.surgeon
>FROM dbo.patients INNER JOIN
> dbo.meetings ON dbo.patients.patientid = dbo.meetings.patientid INNER JOIN
> dbo.meetproc ON dbo.meetings.meetingnumber = dbo.meetproc.meetingnumber
>FOR XML AUTO
>
>
>Thanks in advance.
>Kirk