Hi Vince,
You've to tell CURSORTOXML() that XML should be written to a file because default is to write it to a memory variable. It's done by adding 512 to the forth parameter.
? CURSORTOXML("Cars", lcXMLfilename, 1, 512, 0, "1")
>I am new to XML. Having a problem with a simple routine. I am using vfp7, sp1 installed. What is wrong with the following simple code. It executes, but does not populate the target xml file:
>*** create cursor
>CREATE CURSOR Cars (Make C(15), Model C(15), Year I, BuyDate D)
> INSERT INTO Cars (Make, Model, Year, BuyDate) ;
> VALUES ("Pontiac", "GTO", 1968, {^1995-07-01})
> INSERT INTO Cars (Make, Model, Year, BuyDate) ;
> VALUES ("Chevrolet", "Camaro", 1970, {^1992-05-01})
>
>*** use CURSORTOXML() to create an XML doc
>SELECT Cars
>*browse && cursor does populate
> =CURSORTOXML('Cars', "c:\data2\TargetFile.xml") &&, 1, '1' , '' , '',4 + 2)
>* args give me an error: "function argument value type or count not valid"
>MODI FILE c:\data2\TargetFile.xml && TargetFile.xml does not populate, file empty
>
>Thanx ahead of time, Vince
--sb--