根据MSDN,.NET 4 中有 GetFactory(DbConnection) 的重载。但是,我无法调用它 - 在编译时失败说:
error BC30518: Overload resolution failed because no accessible 'GetFactory' can be called with these arguments:
'Public Shared Function GetFactory(providerRow As System.Data.DataRow) As System.Data.Common.DbProviderFactory': Value of type 'System.Data.Common.DbConnection' cannot be converted to 'System.Data.DataRow'.
'Public Shared Function GetFactory(providerInvariantName As String) As System.Data.Common.DbProviderFactory': Value of type 'System.Data.Common.DbConnection' cannot be converted to 'String'.
我的 .NET FW 有问题还是文档中的错字?