public DataSet GetDataSet(CommandType cmdType, string cmdText) { switch (_dbType) { case DatabaseType.Sqlserver: return(SqlServerUtil.GetDataSet(DbConnectionString, cmdType, cmdText)); case DatabaseType.Mysql: return(MySqlUtil.GetDataSet(DbConnectionString, cmdType, cmdText)); case DatabaseType.Oracle: return(OracleUtil.GetDataSet(DbConnectionString, cmdType, cmdText)); case DatabaseType.Access: return(AccessUtil.GetDataSet(DbConnectionString, cmdText)); default: return(null); } }
public int ExecuteNonQuery(CommandType cmdType, string cmdText) { switch (_dbType) { case DatabaseType.Sqlserver: return(SqlServerUtil.ExecuteNonQuery(DbConnectionString, cmdType, cmdText)); case DatabaseType.Mysql: return(MySqlUtil.ExecuteNonQuery(DbConnectionString, cmdType, cmdText)); case DatabaseType.Oracle: return(OracleUtil.ExecuteNonQuery(DbConnectionString, cmdType, cmdText)); case DatabaseType.Access: return(AccessUtil.ExecuteNonQuery(DbConnectionString, cmdText)); default: return(-1); } }