Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pocket PC Application
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00891724
Message ID:
00892596
Vues:
26
>Regardles of where I put the myXml.xml I get an fileNotFound exception error.
>I've seen syntax with ds.ReadXml(MapPath("myXml.xml")), but that is not available for SDE.
>Do you know how to read/write XML in a SDE application?
>TIA

Hi Doru,
I'm playing with .NET, the PocketPC Emulator (2003) and SQL CE.
I have not yet read/written XML (I'll do some test in the next days :) ) but if you got that error you should try to use the full path.
Suppose you put the xml file in the app's dir, try something like this (VB.NET):
Imports system.IO
Imports System.reflection

dim lcpath as string
dim dbname as string = "myXml.xml"
dim lcfullname as string
lcpath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase.ToString)
lcfullname = Path.Combine(lcpath , dbname)
If File.Exists(lcfullname) Then
    ' you should read the file
End If
I use a similar sintax to create the SQL database in the same directory of the application and it works.

HTH

Franco
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform