如何在Windows CE中存储数据? [英] How to store a data in Windows CE ?
本文介绍了如何在Windows CE中存储数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将Edit控件提供的输入保存到数据文件中?我是Windows编程的新手。有人可以帮帮我。
提前谢谢。
解决方案
< blockquote>这是你在win CE中创建xml文件的方法。
Dim _writer 作为 新 XmlTextWriter(< pre lang = cs> System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly()。GetName()。CodeBase)& < span class =code-string> \ Setting.xml,System.Text.Encoding.UTF8)
_writer.WriteStartDocument ( True )
_writer.Formatting = Formatting.Indented
_writer.Indentation = 2
_writer.WriteStartElement( 目录)
_writer.WriteStartElement( SERVER )
_writer.WriteString( abc)
_writer.WriteEndElement()
_writer.WriteEndElement()
_writer.WriteEndDocument()
_writer.Close()< / pre >
您有多个选项 -
1)Sql Server CE
2)文本文件
3)XML文件
选择任何人。
How do I save the inputs given from Edit control into a data file??? I am really new to Windows programming.Can someone please help me out.
Thanks in advance.
解决方案
this is how you create xml file in win CE.
Dim _writer As New XmlTextWriter(<pre lang="cs">System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)& "\Settings.xml", System.Text.Encoding.UTF8) _writer.WriteStartDocument(True) _writer.Formatting = Formatting.Indented _writer.Indentation = 2 _writer.WriteStartElement("CONTENTS") _writer.WriteStartElement("SERVER") _writer.WriteString("abc") _writer.WriteEndElement() _writer.WriteEndElement() _writer.WriteEndDocument() _writer.Close()</pre>
You have multiple options-
1) Sql Server CE
2) Text File
3) XML file
choose anyone.
这篇关于如何在Windows CE中存储数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文