>Hello comunity,
>
>I try to passed the content of my XML file to cursor, but i have always this error that curiously appear only if i try to import 1 day from my XML fiel to my cursor crstmp ??
>I think the problem is because about the conversion from Character to VAL() : Replace crstmp.qtt With VAL(dossiers.qtt) !?, maybe?
>
Luis,
Try to replace
Replace crstmp.qtt With VAL(dossiers.qtt)
with
Replace crstmp.qtt With IIF(TYPE("dossiers.qtt") == "C", VAL(dossiers.qtt), dossiers.qtt)
If there is a negative qtt value in the XML document, XMLTOCURSOR() creates a character column. Otherwise, it creates a numeric column.
An alternative would be, of course, to specify a schema or to indicate an existing cursor to receive the data. But this will probably solve your problem.
Hi Antonio,
Your solution solve my problem, i always think that anything in XML file are character even if the TAG contains only numbers.
Many thanks,
Luis