public static DataTable GetData(DbConStrInfo conStr, string sql) { if (conStr.ProviderType == ProviderType.MySql) { return(MySqlConnector.GetData(conStr.ConStr, sql)); } else if (conStr.ProviderType == ProviderType.Oracle) { return(OracleConnector.GetData(conStr.ConStr, sql)); } else { return(SqlConnector.GetData(conStr.ConStr, sql)); } }
public static int ExecuteNonQuery(DbConStrInfo conStr, string sql) { if (conStr.ProviderType == ProviderType.MySql) { return(MySqlConnector.ExecuteNonQuery(conStr.ConStr, sql)); } else if (conStr.ProviderType == ProviderType.Oracle) { return(OracleConnector.ExecuteNonQuery(conStr.ConStr, sql)); } else { return(SqlConnector.ExecuteNonQuery(conStr.ConStr, sql)); } }
public static bool TestConnect(DbConStrInfo conStr) { if (conStr.ProviderType == ProviderType.MySql) { return(MySqlConnector.TestConnect(conStr.ConStr)); } else if (conStr.ProviderType == ProviderType.Oracle) { return(OracleConnector.TestConnect(conStr.ConStr)); } else { return(SqlConnector.TestConnect(conStr.ConStr)); } }