Ejemplo n.º 1
0
        public static DatabaseColumn[] GetColumnInfo(DatabaseServer server,
                                                     string tableName,
                                                     string connectionString)
        {
            ISchemaLoader loader = null;

            switch (server)
            {
            case DatabaseServer.Access:
                loader = new AccessSchemaLoader();
                return(loader.GetColumnInfo(tableName, connectionString));

            case DatabaseServer.SqlServer:
                loader = new SqlServerSchemaLoader();
                return(loader.GetColumnInfo(tableName, connectionString));

            case DatabaseServer.MySql:
                loader = new MySqlSchemaLoader();
                return(loader.GetColumnInfo(tableName, connectionString));

            case DatabaseServer.PostgreSQL:
                loader = new PostgreSqlSchemaLoader();
                return(loader.GetColumnInfo(tableName, connectionString));


            default:
                throw new Exception();
            }
        }