--- /dev/null
+package DBIx::Class::Schema::Loader::DBI::ODBC;
+
+use strict;
+use warnings;
+use base 'DBIx::Class::Schema::Loader::DBI';
+use Carp::Clan qw/^DBIx::Class/;
+use Class::C3;
+
+our $VERSION = '0.04999_06';
+
+sub _rebless {
+ my $self = shift;
+ my $dbh = $self->schema->storage->dbh;
+
+# stolen from DBIC ODBC driver for MSSQL
+ my $dbtype = eval { $dbh->get_info(17) };
+ unless ( $@ ) {
+ # Translate the backend name into a perl identifier
+ $dbtype =~ s/\W/_/gi;
+ my $class = "DBIx::Class::Schema::Loader::DBI::ODBC::${dbtype}";
+ eval "require $class";
+ bless $self, $class unless $@;
+ }
+}
+
+1;
--- /dev/null
+package DBIx::Class::Schema::Loader::DBI::ODBC::Microsoft_SQL_Server;
+
+use base 'DBIx::Class::Schema::Loader::DBI::MSSQL';
+
+sub _tables_list {
+ my $self = shift;
+
+ my $dbh = $self->schema->storage->dbh;
+ my @tables = $dbh->tables(undef, $self->db_schema);
+ s/\Q$self->{_quoter}\E//g for @tables;
+ s/^.*\Q$self->{_namesep}\E// for @tables;
+
+ return @tables;
+}
+
+1;