Example #1
0
        protected override IConnectionProvider GetConnectionProvider()
        {
            IDictionary conProviderDict = ConnectionStringDictionary.Parse(ConnectionString);
            string      provider        = (string)conProviderDict["Provider"];

            if (provider == null)
            {
                provider = "SQLCLIENT";
            }

            return(GetConnectionProvider("Mainsoft.Data.Configuration/SqlClientProviders", provider));
        }
Example #2
0
        protected override IConnectionProvider GetConnectionProvider()
        {
            IDictionary conProviderDict = ConnectionStringDictionary.Parse(ConnectionString);
            string      jdbcUrl         = (string)conProviderDict["JdbcUrl"];

            if (jdbcUrl == null)
            {
                string provider = (string)conProviderDict["Provider"];
                if (provider != null)
                {
                    return(GetConnectionProvider("Mainsoft.Data.Configuration/OleDbProviders", provider));
                }
            }

            return(new GenericProvider(conProviderDict));
        }