用户代码未处理 System.ArgumentException,Message 不支持关键字: "sever"
usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.We...
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
/// <summary>
///DB 的摘要说明
/// </summary>
public class DB
{
public DB()
{
//
//TODO: 在此处添加构造函数逻辑
//
}
public static SqlConnection CreateCon()
{
string con = System.Configuration.ConfigurationManager.AppSettings["MyConn"];
SqlConnection conn = new SqlConnection(con);
return conn;
}
} 展开
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
/// <summary>
///DB 的摘要说明
/// </summary>
public class DB
{
public DB()
{
//
//TODO: 在此处添加构造函数逻辑
//
}
public static SqlConnection CreateCon()
{
string con = System.Configuration.ConfigurationManager.AppSettings["MyConn"];
SqlConnection conn = new SqlConnection(con);
return conn;
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询