我的数据库封装类C# Sqlserver

来源:http://www.guanqinbiaoye.com 作者:计算机数据 人气:167 发布时间:2020-03-16
摘要:using System;using System.Data;using System.Configuration;usingSystem.Web;//using System.Web.Security;//using System.Web.UI;//usingSystem.Web.UI.WebControls;//usingSystem.Web.UI.WebControls.WebParts;//usingSystem.Web.UI.HtmlControls;using S

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

本文由威尼斯游戏网站发布于计算机数据,转载请注明出处:我的数据库封装类C# Sqlserver

关键词:

上一篇:win98+PWS环境下连接读取远程SQLServer

下一篇:没有了

最火资讯