Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error to copy content of XML file to Cursor
Message
From
08/02/2022 14:33:30
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
08/02/2022 14:11:51
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01683464
Message ID:
01683480
Views:
25
Luis,
check
?VARTYPE(dossiersnew.u_glnentr),VARTYPE(dossiersnew.qtt),
looks like the fields get translated to something different then character.

If you check the xml, for example the one I send you
<?xml version="1.0" encoding="iso-8859-1"?>
<xml>
	<item>
		<bostamp>Adm22020730717,977000001</bostamp>
		<bistamp>Adm22020730718,046000002</bistamp>
		<ref>DIFGB2L</ref>
		<qtt>1.0000</qtt>
		<lote/>
		<obrano>36</obrano>
		<design>PC Gold&amp;Blue Porcelain 2L Diffuser Bottle (Empty)  </design>
		<lordem>10000</lordem>
		<u_glnentr>5600000025888</u_glnentr>
		<dataobra>2022-02-05 00:00:00.000</dataobra>
	</item>
u_glnentr looks like a number, qtt as well.

If you don't give a (xml) schema, VFP will guess the field type - and might guess wrong. I would guess a number anyway, so why not poor VFP?

Try to create the cursor first and then use flag 8192 for XMLTOCURDSOR, see help to XMLTOCURSOR. Read the stuff about 8192 and schema with some care.

Or try to add a schema to the XML expected via string operation in front of the data, use CURSORTOXML to create a valid one and check for the structure.

Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform