这个意思是将连接数据库的sql字符串放到xml文件,如果要有修改,只修改这个xml就行了,比如,你现在用的数据库是c:\aaa.mdb,但如果你把数据库的路径改了如:C:\ddddd\dd.mdb,你可以只要修改xml的连接字符串就行了,
要求你能有xml的相关资料
如:
System.Xml.XmlDocument xmldoc=new XmlDocument();
xmldoc.PreserveWhitespace=false;
xmldoc.Load(this.GetFileName());
foreach(System.Xml.XmlNode xmlnd in xmldoc.FirstChild.NextSibling.ChildNodes)
{
Debug.WriteLine(xmlnd.Attributes["id"].Value);
if(xmlnd.Attributes["id"].Value==this.m_ExceptionID.ToString())
{
result=xmlnd.ChildNodes[0].InnerText;
break;
}
}
要求你能有xml的相关资料
如:
System.Xml.XmlDocument xmldoc=new XmlDocument();
xmldoc.PreserveWhitespace=false;
xmldoc.Load(this.GetFileName());
foreach(System.Xml.XmlNode xmlnd in xmldoc.FirstChild.NextSibling.ChildNodes)
{
Debug.WriteLine(xmlnd.Attributes["id"].Value);
if(xmlnd.Attributes["id"].Value==this.m_ExceptionID.ToString())
{
result=xmlnd.ChildNodes[0].InnerText;
break;
}
}
解决方案 »
- dbhelpersql中的GetMaxId
- listviewitem item=new listviewitem(str,0)的含义
- vs2008 express版本里的数据库连接
- 添加歌曲到列表,只显示歌曲名,并且单击列表中的歌曲名能够播放
- 自己写的代码太傻,请大家给我一个比较好的写法,谢了:)
- 在.net中用odbc对XSJL.db数据库文件进行插入数据操作
- 请问在WIN2003下怎么跳过组件更新,直接安装vs.net
- 串口转键盘口
- 终于下到了《INSIDE C#》,献给大家
- C# winform 关于panel 控件的使用
- 安装Visual Studio .net的框架后发现的问题
- 那位高手能告诉我在一个datagrid里显示两个表的数据呢???
我从写用过xml的东西
我从未写用过xml的东西
如果你是在写asp.net,你的意思说见:
http://expert.csdn.net/Expert/topic/1442/1442196.xml?temp=9.574527E-02