Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pocket PC Application
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00891724
Message ID:
00892596
Views:
28
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform