/// <summary> /// 执行SQL语句,返回影响的记录数 /// </summary> /// <param name="SQLString">SQL语句</param> /// <returns>影响的记录数</returns> public static int ExecuteSql(string dbKey, string SQLString, params MySqlParameter[] cmdParms) { MyDbConnection2 conn = null; try { conn = PopDBConnection(dbKey); if (null == conn) { return(-1); } return(conn.ExecuteSql(SQLString, cmdParms)); } finally { PushDBConnection(conn); } }
public static int ExecuteSql(string dbKey, string SQLString, params MySqlParameter[] cmdParms) { MyDbConnection2 conn = null; int result; try { conn = DbHelperMySQL3.PopDBConnection(dbKey); if (null == conn) { result = -1; } else { result = conn.ExecuteSql(SQLString, cmdParms); } } finally { DbHelperMySQL3.PushDBConnection(conn); } return(result); }