Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLAdapter toXML defaults numeric fields to 0
Message
De
03/06/2005 12:05:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
XMLAdapter toXML defaults numeric fields to 0
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01019951
Message ID:
01019951
Vues:
96
Hi,

When calling the toXML method, if the cursor I have loaded into the XMLAdapter object via AddTableSchema is blank, than it defaults to a 0 in the XML file. So I looped through all the tables I added and set the isnull property for every field to .T., but this doesn't seem to help. Are there any other properties that I am not finding that keep the toXML command from defaulting numeric fields to 0? I have included the relavent code below. Thanks in advance.

LOCAL oXMLAdapter as XMLAdapter
oXMLAdapter = NEWOBJECT('XMLAdapter')
oXMLAdapter.RespectNesting = .T.
oXMLAdapter.XMLSchemaLocation = ""

*Add all the tables to the XMLAdapter object
rec_type_counter = 1
SELECT tablenames
SCAN
command = "oXMLAdapter.AddTableSchema('"+tablenames.rec_type+"')"
&command
lc_count = oXMLAdapter.Tables.Item(rec_type_counter).Fields.count
FOR i=1 TO lc_count
oXMLAdapter.Tables.Item(rec_type_counter).Fields.item(i).isnull = .T.
ENDFOR
rec_type_counter = rec_type_counter + 1
ENDSCAN

oXMLadapter.TOXML(lc_outfile_name,,.t.)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform