Fix JetConnection and DbConnectionStringBuilderExtensions issue.

pull/47/head
Lau 6 years ago
parent f86cf6e0b4
commit 4e2fa27535

@ -29,7 +29,7 @@ namespace System.Data.Jet
}
else if (IsOdbc(builder))
{
builder["driver"] = Regex.Replace(value.Trim(), @"^(?<!\{).*(?!\})$", @"{$1}", RegexOptions.IgnoreCase);
builder["driver"] = Regex.Replace(value.Trim(), @"^(?<!\{)(.*)(?!\})$", @"{$1}", RegexOptions.IgnoreCase);
}
else
throw new InvalidOperationException("This extension method only supports OdbcConnectionStringBuilder and OleDbConnectionStringBuilder.");

@ -80,7 +80,7 @@ namespace System.Data.Jet
/// <exception cref="InvalidOperationException">This property can only be set as long as the connection is closed.</exception>
public DbProviderFactory DataAccessProviderFactory
{
get => JetFactory.InnerFactory;
get => JetFactory?.InnerFactory;
set
{
if (value == null)

Loading…
Cancel
Save