Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create DataSet from empty VFP table via XML?
Message
De
08/04/2005 12:06:02
 
Information générale
Forum:
ASP.NET
Catégorie:
XML
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01002634
Message ID:
01002661
Vues:
15
Paul,

Try using XML schemas for your DataSets (.xsd files). Look at XSD Schemas in the VS documentation. As an example to get you started and see how to use these DataSets, you can take your existing DataSet (with data in it) and use the .WriteXml() method to create an .xsd file. Then look at it in VS to see what the structure looks like. You can add this .xsd to your project and use it as your DataSet. You can also create an .xsd from scratch using the designer ... in your project right click and choose "Add New Item" or "Add Class" and then choose DataSet from the templates.

This should get you started.

~~Bonnie





>I am writing an Windows Mobile application using C# and the .NET Compact Framework. The application is a streamlined client for one of our desktop products which is written in VFP8. Communication with the VFP data is done via Web Services written in VFP.
>
>One of the functions of the software is to maintain a local copy of a subset of some of the data. Some of this data I store in SQLCE tables, and some I simply store in local DataSets. The problem is that at startup, several of the tables I need are likely to be empty and I cannot pull an empty cursor into a DataSet via it's ReadXML method because it crashes. In that situation, I would like to be able to just return an XML Schema and create the DataSet with an empty DataTable. This would save me a lot of time coding up structures manually, and a lot of maintenance issues trying to maintain those data structures.
>
>I am very much a beginner at .NET and at XML, so any suggestions would be very much appreciated.
>
>Thanks,
>
>Paul Moon
>Business Software Solutions
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform