diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Common/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs b/src/Microsoft.Data.SqlClient/netcore/src/Common/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs index d8d9d21957..88ca0725c2 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Common/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs +++ b/src/Microsoft.Data.SqlClient/netcore/src/Common/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs @@ -283,7 +283,7 @@ internal DataRow FindMetaDataCollectionRow(string collectionName) exactCollectionName = candidateCollectionName; haveExactMatch = true; } - else + else if (haveExactMatch == false) { // have an inexact match - ok only if it is the only one if (exactCollectionName != null) diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs index 644d336232..bea2e6cae5 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs @@ -322,7 +322,7 @@ internal DataRow FindMetaDataCollectionRow(string collectionName) exactCollectionName = candidateCollectionName; haveExactMatch = true; } - else + else if (haveExactMatch == false) { // have an inexact match - ok only if it is the only one if (exactCollectionName != null)