Esempio n. 1
0
        private static string GetServerLocation(List <DictionaryEntry> Ls)
        {
            string provider       = GetDBProvider(Ls);
            string serverLocation = GetDefaultServerLocation(TestDatabaseProviders.GetProvider(provider));

            return(serverLocation);
        }
Esempio n. 2
0
        private static TestDatabaseProviderInfo GetDefaultDBProvider()
        {
            // if Environment variable DB provider is defined, default DB provider == %DBProvider%
            // Default DB Provider is SQL2005
            string result = SafeGetEnvironmentVariableOrDefault("DbProvider", "SQL2005");

            return(TestDatabaseProviders.GetProvider(result));
        }
Esempio n. 3
0
 public static string GetDefaultServerLocation(string providerName)
 {
     return(TestDatabaseProviders.GetProvider(providerName).Location);
 }
Esempio n. 4
0
 private static string GetDBConnectionStringNoCreate(string dbName, List <DictionaryEntry> Ls)
 {
     try
     {
         string NewDBName = GetNewDBName(dbName);
         return("Server=" + GetServerLocation(Ls) + ";Database=" + NewDBName + ";" + TestDatabaseProviders.GetProvider(GetDBProvider(Ls)).Credentials);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         throw;
     }
 }
Esempio n. 5
0
 public static string GetDefaultServerDataFilePath(string providerName)
 {
     return(TestDatabaseProviders.GetProvider(providerName).DataFilePath);
 }
Esempio n. 6
0
 public static string GetDefaultServerCredentials(string providerName)
 {
     return(TestDatabaseProviders.GetProvider(providerName).Credentials);
 }