2013-07-23 27 views
5

Theo MSDN có một tình trạng quá tải của GetFactory (DbConnection) trong .NET 4. Tuy nhiên, tôi không thể gọi nó - không tại thời gian biên dịch nói:DbProviderFactories.GetFactory Method (DbConnection) thiếu

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'. 

Có gì sai với .NET FW của tôi hay nó là một lỗi đánh máy trong tài liệu?

+0

+1 khẳng định, tương tự cho tôi với .NET 4. –

Trả lời