Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with cursorToXml function
Message
 
 
To
22/07/2003 17:44:56
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00812575
Message ID:
00812580
Views:
20
This message has been marked as the solution to the initial question of the thread.
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform