public void SybaseAnyWhereTest() { const string providername = "iAnyWhere.Data.SQLAnyWhere"; const string connectionString = "Data Source=SQL Anywhere 12 Demo"; ProviderChecker.Check(providername, connectionString); DiscoverProviderFactory.Discover(connectionString, providername); var dbReader = new DatabaseReader(connectionString, providername, 0); var schema = dbReader.ReadAll(); Assert.IsTrue(schema.Tables.Count > 0); }
public void SybaseAseTest() { //using pubs3 with default sa account with Ase Developer Edition 15 on localhost (had to use IP address to get it to connect) const string providername = "Sybase.Data.AseClient"; const string connectionString = "Server=192.168.1.100;Port=5000;Uid=sa;Pwd='';Initial Catalog=pubs3"; ProviderChecker.Check(providername, connectionString); DiscoverProviderFactory.Discover(connectionString, providername); var dbReader = new DatabaseReader(connectionString, providername, 0); var schema = dbReader.ReadAll(); Assert.IsTrue(schema.Tables.Count > 0); }
public void MySqlViaDevartTest() { const string providername = "Devart.Data.MySql"; var connectionString = ConnectionStrings.MySqlDevart; ProviderChecker.Check(providername, connectionString); DiscoverProviderFactory.Discover(connectionString, providername); var dbReader = new DatabaseReader(connectionString, providername); dbReader.Owner = "sakila"; var schema = dbReader.ReadAll(); var country = schema.FindTableByName("country"); Assert.AreEqual(3, country.Columns.Count); Assert.IsNotNull(country.PrimaryKeyColumn); var table = dbReader.Table("city"); Assert.AreEqual(4, table.Columns.Count); }
public void TestAccess2007() { const string providername = "System.Data.OleDb"; const string dir = @"C:\Data\Nwind.accdb"; if (!File.Exists(dir)) { Assert.Inconclusive("Access test requires database file " + dir); } const string connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + dir; ProviderChecker.Check(providername, connectionString); DiscoverProviderFactory.Discover(connectionString, providername); var dbReader = new DatabaseReader(connectionString, providername); var schema = dbReader.ReadAll(); var table = schema.FindTableByName("Products"); Assert.IsTrue(table.Columns.Count > 0); }