示例#1
0
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="type"></param>
        /// <param name="key"></param>
        /// <param name="sql"></param>
        public static int Execute(string type, string key, string sql)
        {
            int n = -1;

            if (type.Equals(""))
            {
                type = DbTypes.SQL;
            }
            switch (type)
            {
            case DbTypes.SQL:
                n = SqlModel.Execute(key, sql); break;

            case DbTypes.ORA:
                n = OracleModel.Execute(key, sql); break;
            }
            return(n);
        }
示例#2
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        public static DataTable Query(string type, string key, string sql)
        {
            DataTable dt = null;

            if (type.Equals(""))
            {
                type = DbTypes.SQL;
            }
            switch (type)
            {
            case DbTypes.SQL:
                dt = SqlModel.Query(key, sql); break;

            case DbTypes.ORA:
                dt = OracleModel.Query(key, sql); break;
            }
            return(dt);
        }
示例#3
0
 public static string Execute(string sql, params OracleParameter[] pas)
 {
     return(OracleModel.Execute(DbKey.ORA, sql, pas));
 }
示例#4
0
 public static int Execute(string sql)
 {
     return(OracleModel.Execute(DbKey.ORA, sql));
 }
示例#5
0
 public static DataTable Query(string sql, params OracleParameter[] pas)
 {
     return(OracleModel.Query(DbKey.ORA, sql, pas));
 }
示例#6
0
 public static DataTable Query(string sql)
 {
     return(OracleModel.Query(DbKey.ORA, sql));
 }