我的数据库封装类C

澳门新萄京 ,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.CommandTimeout = 0; } public DbAccess(string
constr) { // // TODO: 在此处添加构造函数逻辑 // co

发表评论

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