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;using
System.Text;using System.Collections;namespace mySqlSQLDB{

}

public class DbAccess { SqlConnection conn = null; SqlCommand cmd =
null; public DbAccess(卡塔尔(قطر‎ { // // TODO: 在这里地增加布局函数逻辑 // conn =
new SqlConnection(卡塔尔国; conn.ConnectionString =
Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings[datasource]);
//conn.ConnectionString = initial catalog=_new;data source=.;user
id=bt;password=btbtbtbt;Connect Timeout=5000; cmd = new SqlCommand(卡塔尔(قطر‎;
cmd.Connection = conn; cmd.Command提姆eout = 0; } public DbAccess(string
constr卡塔尔 { // // TODO: 在此加多布局函数逻辑 // co

    public void Update(Int32 id, string name, string banji)
    {
        cmd.CommandText = “testUpdate”;
        cmd.CommandType = CommandType.StoredProcedure;

    public DataTable dt()
    {
        sda.SelectCommand = new SqlCommand(“testSelect”);
        sda.SelectCommand.CommandType=CommandType.StoredProcedure;
        sda.Fill(ds,”test”);
        return ds.Tables[“test”];
    }

威斯尼人娱乐场,        cmd.Parameters.AddWithValue(“@id”, id);
        cmd.Parameters.AddWithValue(“@name”, name);
        cmd.Parameters.AddWithValue(“@class”, banji);
澳门威斯尼斯7377,        cmd.Parameters.AddWithValue(“@Original_id”, id);

/// <summary>
/// Produce 的摘要表达
/// </summary>
public class Produce
{
    private SqlConnection conn;
    private SqlCommand cmd;
    private SqlDataAdapter sda;
    private DataSet ds;

    public Produce()
{
        conn = new
SqlConnection(ConfigurationManager.ConnectionStrings[“testConn”].ConnectionString);
        cmd = new SqlCommand();
        sda = new SqlDataAdapter();
        ds = new DataSet();     
}

Author

发表评论

电子邮件地址不会被公开。 必填项已用*标注