示例#1
0
        public static object ExecuteGeneral(String cnName, CommandType cmdType, string sSql, object cmdParameters, CommandMode cmdMode)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(null);
            }
            object oR = db.ExecuteGeneral(cmdType, sSql, cmdParameters, cmdMode);

            db.Close();
            return(oR);
        }
示例#2
0
        public static DbResult ExecuteGeneral_R(String cnName, CommandType cmdType, string sSql, object cmdParameters, CommandMode cmdMode)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            object oR = null;

            if (db.IsConnected)
            {
                oR = db.ExecuteGeneral(cmdType, sSql, cmdParameters, cmdMode);
            }
            DbResult dr = new DbResult(db);

            db.Close();
            return(dr);
        }