/// <summary> /// 更新大量数据 /// </summary> /// <param name="dicDt">数据表字典</param> /// <param name="sErr">错误信息</param> /// <returns>是否成功更新</returns> public static bool AdapterSaveMastData(Dictionary <string, DataTable> dicDt, ref string sErr) => AdapterSaveMastData(DbConn.GetOleConn(), dicDt, ref sErr);
/// <summary> /// 得到连接适配器 /// </summary> /// <param name="sSql">查询语句</param> /// <returns>OleDb适配器</returns> public static OleDbDataAdapter GetAdapter(string sSql) => GetAdapter(DbConn.GetOleConn(), sSql);
/// <summary> /// 查询得到数据表 /// </summary> /// <param name="sSql">查询语句</param> /// <param name="sErr">错误信息</param> /// <returns>数据表</returns> public static DataTable GetDataTable(string sSql, ref string sErr) => GetDataTable(DbConn.GetOleConn(), sSql, ref sErr);
/// <summary> /// 执行SQL语句 /// </summary> /// <param name="sSql">SQL语句</param> /// <param name="sErr">错误信息</param> /// <returns>查询得到的第一行第一列</returns> public static object ExecSqlScalar(string sSql, ref string sErr) => ExecSqlScalar(DbConn.GetOleConn(), sSql, ref sErr);
/// <summary> /// 执行SQL语句 /// </summary> /// <param name="aPara">OleDb数据库参数</param> /// <param name="sSql">SQL语句</param> /// <param name="sErr">错误信息</param> public static void ExecSql(OleDbParameter[] aPara, string sSql, ref string sErr) => ExecSql(DbConn.GetOleConn(), aPara, sSql, ref sErr);
/// <summary> /// 更新数据库 /// </summary> /// <param name="dt">待同步数据表</param> /// <param name="sSql">查询语句</param> /// <param name="sErr">错误信息</param> /// <returns>是否成功更新</returns> public static bool AdapterSaveData(DataTable dt, string sSql, ref string sErr) => AdapterSaveData(DbConn.GetOleConn(), dt, sSql, ref sErr);
/// <summary> /// 执行SQL语句 /// </summary> /// <param name="sSql">SQL语句</param> /// <param name="sErr">错误信息</param> public static void ExecSql(string sSql, ref string sErr) => ExecSql(DbConn.GetOleConn(), sSql, ref sErr);
/// <summary> /// 执行操作 /// </summary> /// <param name="sProcName">操作字符串</param> /// <param name="arrPara">OleDb数据库参数</param> /// <param name="sErr">错误信息</param> public static void ExecProcedre(string sProcName, OleDbParameter[] arrPara, ref string sErr) => ExecProcedre(DbConn.GetOleConn(), sProcName, arrPara, ref sErr);