C# sqlhelp】的更多相关文章

using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Data; using System.Configuration; using System.Reflection; using System.Collections; namespace DataHelp { #region ADO.NET 访问数据库辅助类 +SqlHelp //Author:兵兵 +SqlHelp…
刚开始练习ADONET的时候,练习的一个SQLHelp.cs  数据库操作类,很简单,但是也很实用 using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespac…
using System.Configuration;using System.Data; public class SqlHelp { private static string connection = ConfigurationManager.ConnectionStrings["db"].ConnectionString; // 执行insert.delete.update的方法 public static int ExcuteNonQuery(string sql, para…
简单,实用,留存. using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CarHailing.Base { /// <summary> /// 数…
public class SqlHelp { //数据库连接字符串 public static string connectionString = ConfigurationManager.ConnectionStrings["strCon"].ConnectionString; // 用于缓存参数的HASH表 public static Hashtable parmCache = Hashtable.Synchronized(new Hashtable()); /// <sum…
public readonly static string connStr = ConfigurationManager.ConnectionStrings["conn"].ConnectionString;   //从 web.config中获得 /// <summary> /// 执行查询,返回datatable   /// </summary> /// <param name="text"></param> //…
练习开发WPF程序的时候,是这样写的,虽然很简单,相必很多新手会用到,所以拿来共享一下, using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Configuration; using System.Data.SqlClient; using System.Data; namespace HRMSys.DAL { static class SqlHelp…
ConnectionInit方法用于初始化数据库连接对象, 只需要修改databasetype参数即可进行适用各个版本的数据库, ExecuteNonQuery方法用于执行增.删.改操作,返回受影响的行数, ExecuteTableSQL方法用于执行查询操作,返回datatable格式的数据, using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Dat…
public abstract class SQLHelper { //只读的静态数据库连接字符串 //需添加引用System.Configuration; public static readonly string connString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; //public static readonly string connString = &…
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data; using System.Data.SqlClient; namespace Reservation.DAL { public class SqlHelper { /// <summary> /// 自定义数据库连接字符串 //…