请问用vs2005开发windows程序该去论坛的哪个板块提问呢?
如题~~
------解决方案--------------------要看你用的什么语言开发,不同语言有不同的板块。。。
------解决方案--------------------C#就可以的
还要看你是用什么语言了?
------解决方案--------------------就是这里
------解决方案-------------------- public static string Getonezzb
{
get { return "server=" + GetXmlString("DbConfig.config", "DataBaseSetting/Server1") + ";database=" + GetXmlString("DbConfig.config", "DataBaseSetting/DbName1") + ";Uid=" + GetXmlString("DbConfig.config", "DataBaseSetting/UID1") + ""; }
}
private static string GetXmlString(string Filename,string Xmlpath)
{
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(Application.StartupPath+"\\"+Filename);
string strValue = null;
try
{
XmlNode myNode = xmldoc.SelectSingleNode(Xmlpath);
strValue = myNode.InnerText.Trim();
}
catch (Exception e)
{
strValue = "Configuration File Read Error.\nDetail information:" + e.Message;
}
return strValue;
}
public static SqlConnection AccessToData(string ConnString)
{
SqlConnection _SqlConn = new SqlConnection(ConnString);
_SqlConn.Open();
return _SqlConn;
}