Example #1
0
        public IEnumerable <string> GetSchemaNamesForServer(ConnectionStringHelper serverInfo)
        {
            if (serverInfo.CurrentDbType == DatabaseTypes.PostgreSQL)
            {
                return(PostgreSQLHelper.GetPostgreSQLSchemas(serverInfo));
            }

            throw new NotImplementedException("This database type not handled yet in GetSchemaNamesForServer(): " + serverInfo.CurrentDbType.ToString());
            //return new List<string>();
        }
Example #2
0
        public IEnumerable <string> GetDatabaseNamesForServer(ConnectionStringHelper serverInfo)
        {
            //if (serverInfo.CurrentDbType == DatabaseTypes.SQLServer2000)
            //    return SqlServer2005Helper.GetSQlServer2005Databases(serverInfo);

            if (serverInfo.CurrentDbType == DatabaseTypes.SQLServer2005)
            {
                return(SqlServer2005Helper.GetSQlServer2005Databases(serverInfo));
            }

            if (serverInfo.CurrentDbType == DatabaseTypes.MySQL)
            {
                return(MySQLHelper.GetMySQLDatabases(serverInfo));
            }

            if (serverInfo.CurrentDbType == DatabaseTypes.Oracle)
            {
                return(OracleHelper.GetOracleDatabases(serverInfo));
            }

            if (serverInfo.CurrentDbType == DatabaseTypes.PostgreSQL)
            {
                return(PostgreSQLHelper.GetPostgreSQLDatabases(serverInfo));
            }

            if (serverInfo.CurrentDbType == DatabaseTypes.SQLServerExpress)
            {
                return(SqlServerExpressHelper.GetSqlServerExpressDatabases(serverInfo));
            }

            if (serverInfo.CurrentDbType == DatabaseTypes.SQLite)
            {
                return(SQLiteHelper.GetSQLiteDatabases(serverInfo));
            }

            throw new NotImplementedException("This database type not handled yet in GetDatabaseNamesForServer(): " + serverInfo.CurrentDbType.ToString());
            //return new List<string>();
        }
Example #3
0
        public IEnumerable <string> GetServerNames(DatabaseTypes databaseType)
        {
            if (databaseType == DatabaseTypes.SQLServer2005)
            {
                return(SqlServer2005Helper.GetSqlServer2005Instances());
            }

            if (databaseType == DatabaseTypes.MySQL)
            {
                return(MySQLHelper.GetMySQLInstances());
            }

            if (databaseType == DatabaseTypes.Oracle)
            {
                return(OracleHelper.GetOracleInstances());
            }

            if (databaseType == DatabaseTypes.PostgreSQL)
            {
                return(PostgreSQLHelper.GetPostgreSQLInstances());
            }

            if (databaseType == DatabaseTypes.SQLServerExpress)
            {
                return(SqlServerExpressHelper.GetSqlServerExpressInstances());
            }

            if (databaseType == DatabaseTypes.SQLite)
            {
                return(SQLiteHelper.GetSQLiteInstances());
            }

            throw new NotImplementedException("This database type not handled yet in GetServerNames(): " + databaseType.ToString());

            //return new List<string>();
        }