Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLToCursor Problem?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00668798
Message ID:
00668812
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
There's no info about element types in the XML created by CursortoXML with parameters you specify. CursortoXML "guesses" the type based on item values. For example, if you add third row into cursor
INSERT INTO Foo VALUES ('A')
than field type will be character in NewFoo. You can add inline schema to the XML CursortoXML which includes item type info.
CursortoXML("Foo","lcXMLData", 1,0,0, "1")
BTW, it's enough to use just < pre > and < /pre > tags for a code.


>Hi Everybody, I'm using the functions XMLToCursor() y CursorToXML() to generate a COM Component, but I found a little problem with them:
>
>

> CREATE CURSOR Foo (LeadingZero c(13))
> INSERT INTO Foo VALUES('0090810490000')
> INSERT INTO Foo VALUES ('0010200520001')
>
> ?VARTYPE(foo.leadingzero)
> CursortoXML("Foo","lcXMLData")
>
> USE IN "Foo"
>
> XMLtoCursor(lcXMLData,"NewFoo")
> ?VARTYPE(newfoo.leadingzero)
>
>

> *** As u can see, the LeadingZero field now is a Numeric type.
>
>I can use PADL() to get back the field as a string (keeping the leading zeros), but I think there shoud be another way to get what I want, wich is, no conversion in field types. My question is: What am I doing wrong?,
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform