using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient; //自己导入命名空间
/// <summary>
/// DB 的摘要说明
/// </summary>
public class DB
{
public DB()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
//建立链接
public static SqlConnection createConnection()
{
System.Data.SqlClient.SqlConnection con = new SqlConnection("server=localhost;database=login;Uid=sa;Pwd=admin;");
return con;
}
}
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient; //自己导入命名空间
/// <summary>
/// DB 的摘要说明
/// </summary>
public class DB
{
public DB()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
//建立链接
public static SqlConnection createConnection()
{
System.Data.SqlClient.SqlConnection con = new SqlConnection("server=localhost;database=login;Uid=sa;Pwd=admin;");
return con;
}
}