Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error to copy content of XML file to Cursor
Message
De
08/02/2022 15:03:35
 
 
À
08/02/2022 04:30:20
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01683464
Message ID:
01683484
Vues:
36
>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)   && Error happen here 
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.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform