Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursortoxml and xmltocursor
Message
De
18/06/2010 01:25:15
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Cursortoxml and xmltocursor
Divers
Thread ID:
01469554
Message ID:
01469554
Vues:
151
Hi Guys,

I want to create a program that will convert a cursor into an xml file and later use that xml file to retrieve the data stored in it. I created the following cursor

CREATE CURSOR mycur (pono c(10), order I(4))

I then populated this cursor with the following records

1000 0
1001 1
1002 1

I then converted this cursor to xml using the following lines of code

CURSORTOXML("mycur","lcXML",1,48)
STRTOFILE(lcXML,"c:\mycur1.xml")

when its time for me to use the xml file and convert it back into a cursor I used the following lines of code
XMLTOCURSOR("c:\mycur1.xml","newcur",4)

The main problem is that the data type for the field pono has changed to Integer and the field for order has changed to L(1) or logical. Is there a way to retain the original field types of the original cursor which in this case is mycur? I am expecting that when I convert the xml file back to cursor using this line of code, XMLTOCURSOR("c:\mycur1.xml","newcur",4) it will create a new cursor with an alias of newcur having the same fields and data type as mycur.

Please help and thanks in advance...
Music Rocks www.musicreserve.blogspot.com
Success is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform