예제 #1
0
        public DataSet GetDataSet(CommandType cmdType, string cmdText)
        {
            switch (_dbType)
            {
            case DatabaseType.Sqlserver:
                return(SqlServerUtil.GetDataSet(DbConnectionString, cmdType, cmdText));

            case DatabaseType.Mysql:
                return(MySqlUtil.GetDataSet(DbConnectionString, cmdType, cmdText));

            case DatabaseType.Oracle:
                return(OracleUtil.GetDataSet(DbConnectionString, cmdType, cmdText));

            case DatabaseType.Access:
                return(AccessUtil.GetDataSet(DbConnectionString, cmdText));

            default:
                return(null);
            }
        }
예제 #2
0
        public int ExecuteNonQuery(CommandType cmdType, string cmdText)
        {
            switch (_dbType)
            {
            case DatabaseType.Sqlserver:
                return(SqlServerUtil.ExecuteNonQuery(DbConnectionString, cmdType, cmdText));

            case DatabaseType.Mysql:
                return(MySqlUtil.ExecuteNonQuery(DbConnectionString, cmdType, cmdText));

            case DatabaseType.Oracle:
                return(OracleUtil.ExecuteNonQuery(DbConnectionString, cmdType, cmdText));

            case DatabaseType.Access:
                return(AccessUtil.ExecuteNonQuery(DbConnectionString, cmdText));

            default:
                return(-1);
            }
        }