Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem converting empty date to DataSet
Message
De
20/08/2013 14:18:23
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Titre:
Problem converting empty date to DataSet
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01580842
Message ID:
01580842
Vues:
62
I am returning a cursor from FoxPro using CursorToXML(lcAlias,"lcXML",1,0,0,"1"), then converting the XML to a DataSet in .NET. It works well unless the cursor includes empty dates. .NET doesn't like them. It wants NULLs, meaning the field element is excluded altogether in the XML. I can work around the issue by not including a schema, but that treats everything as a string and doesn't meet my needs. I don't want to replace the empty date fields with NULL in FoxPro. I could strip the empty fields out of the XML on the .NET side before loading the XML into a DataSet, which is ok, but I'm wondering if there is a better solution? I have read Message #1199897, but that didn't work for me.

Thanks.
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform