Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with xmltocursor() function
Message
De
06/12/2001 09:05:32
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00590428
Message ID:
00590478
Vues:
21
This message has been marked as the solution to the initial question of the thread.
Hi Marcio do the following cursortoxml("curSAMPLE", "lcXML", 1, 2, 0, "1") this will generate the schema also. on xml logical values are represented with 0/1 for false/true so if you generate an xml without the schema when you create the cursor from that xml VFP will analyse the elements to see what type of fields will be created so if you have a field with values 1 or 0 them VFP will create the field as logical unless in the hole xml you have a value for that field greater than 1.
I hope that this will help you.

>*!* The problem occurs when xmltocursor() function convert a numeric value:
>
>*!* - if the value is 0, the incorrect result is .F.
>*!* - if the value is 1, the incorrect result is .T.
>
>*!* Is this a bug?
>
>*!* Thanks,
>
>*!* Marcio Goncalves
>*!* Niteroi-Rio de Janeiro-Brasil
>
>create table SAMPLE (name c(10), age i)
>insert into SAMPLE (name, age) values ("Marcio", 1)
>insert into SAMPLE (name, age) values ("Ghandi", 2)
>select * from SAMPLE where name = "Ghandi" into cursor curSAMPLE
>cursortoxml("curSAMPLE", "lcXML")
>xmltocursor(lcXML, "curSAMPLE_CORRECT")
>browse
>select *, "See the age!" as Bug from SAMPLE where name = "Marcio" into cursor curSAMPLE2
>cursortoxml("curSAMPLE2", "lcXML2")
>xmltocursor(lcXML2, "curSAMPLE2_BUG")
>browse
Alexandre Palma
Senior Application Architect
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform