Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with XMLTOCURSOR Function (Why does 0 = .F.)
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00736176
Message ID:
00736198
Views:
15
Thank you very much Sergey, it works perfectly !!!

Regards,


>> You can specify inline schema in CURSORTOXML() to preserve field types. For example,

CREATE CURSOR test1 ( ;
fieldi i, fieldn N(10), ;
fieldl L , fieldc C(10) )

INSERT INTO test1 VALUES(0, 0, .f., "0")
INSERT INTO test1 VALUES(1, 1, .t., "1")
lcXml = ""
? Cursortoxml("test1", "lcXml", 1,0, 0, "1")
? Xmltocursor(lcXml, "test2")

SELECT test2
LIST STRUCTURE

>Hi Guys,
>
>I've been using the XMLTOCURSOR Function that ships with VFP7 in my middle-tier data access clases. The problem is that whenever ever I have a value of zero(0) for a particular tag, the cursor is generated with a Logical(.F.) datatype for that field. If I change the value of the tag with a one(1) the cursor is generated correctly.
>
>Any tips on how to get around this would be greatly apreciated !!
>
>
>NJM,
"If glory comes after death, I have no hurry"
Marcial
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform