Hi Alex,
VFP (before VFP9) always opens copies of tables or cursors for a query so anything in buffers is invisible for the query. Using XML is interesting idea and will work as long as cursor is small. With bigger cursor it may became too slow.
>
>This problem uncovered something that to me seems quite interesting.
>
>The data is obviously there, available to vfp, as I can scan through the cursor, make calculations based on its data, etc., however, for some reason, the part of VFP's data engine that parses sql statements bounces against this as if there was a brickwall surrounding the cursor if you try to query it with sql statements.
>
>The workaround I've found was to convert the cursor to xml and then convert the resulting xml to another cursor. It's easier and requires less explicit garbage collection than going the COPY TO route.
>
--sb--