示例#1
0
 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));
     }
 }
示例#2
0
 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));
     }
 }
示例#3
0
 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));
     }
 }