public static MyDataReader ExecuteReader(string dbKey, string strSQL) { MyDbConnection2 conn = DbHelperMySQL3.PopDBConnection(dbKey); MyDataReader result; if (null != conn) { MySqlDataReader mySqlDataReader = conn.ExecuteReader(strSQL, new MySqlParameter[0]); MyDataReader myDataReader = new MyDataReader(conn, mySqlDataReader); result = myDataReader; } else { result = null; } return(result); }
public static void ExecuteSqlTranWithIndentity(string dbKey, Hashtable SQLStringList) { MyDbConnection2 conn = null; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null != conn) { conn.ExecuteSqlTranWithIndentity(SQLStringList); } } finally { DbHelperMySQL3.PushDBConnection(conn); } }
public static object GetSingle(string dbKey, string SQLString, int Times) { MyDbConnection2 conn = null; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null != conn) { return(conn.GetSingle(SQLString, Times, new MySqlParameter[0])); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(null); }
public static int ExecuteSqlInsertImg(string dbKey, string strSQL, List <Tuple <string, byte[]> > imgList) { MyDbConnection2 conn = null; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null != conn) { return(conn.ExecuteSqlInsertImg(strSQL, imgList)); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(-1); }
public static object ExecuteSqlGet(string dbKey, string SQLString, string content) { MyDbConnection2 conn = null; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null == conn) { return(conn.ExecuteSqlGet(SQLString, content)); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(null); }
public static int ExecuteSqlTran(string dbKey, List <string> SQLStringList) { MyDbConnection2 conn = null; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null != conn) { return(conn.ExecuteSqlTran(SQLStringList)); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(0); }
public static int ExecuteSqlTran(string dbKey, List <CommandInfo> list, List <CommandInfo> oracleCmdSqlList) { MyDbConnection2 conn = null; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null != conn) { return(conn.ExecuteSqlTran(list, oracleCmdSqlList)); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(0); }
public static int ExecuteSqlByTime(string dbKey, string SQLString, int Times) { MyDbConnection2 conn = null; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null != conn) { return(conn.ExecuteNonQuery(SQLString, Times)); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(-1); }
public static DataSet Query(string dbKey, string SQLString, params MySqlParameter[] cmdParms) { MyDbConnection2 conn = null; DataSet result; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null == conn) { result = null; } else { result = conn.Query(SQLString, cmdParms); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(result); }
public static MySqlDataReader ExecuteReader(string dbKey, string SQLString, params MySqlParameter[] cmdParms) { MyDbConnection2 conn = null; MySqlDataReader result; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null == conn) { result = null; } else { result = conn.ExecuteReader(SQLString, cmdParms); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(result); }
public static object GetSingle(string dbKey, string SQLString, params MySqlParameter[] cmdParms) { MyDbConnection2 conn = null; object result; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null == conn) { result = -1; } else { result = conn.GetSingle(SQLString, 0, cmdParms); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(result); }
public static int ExecuteSqlTran(string dbKey, List <CommandInfo> cmdList) { MyDbConnection2 conn = null; int result; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null == conn) { result = -1; } else { result = conn.ExecuteSqlTran(cmdList); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(result); }