Redigera

Dela via


DbProviderFactories.GetFactory Method

Definition

Returns an instance of a DbProviderFactory.

Overloads

GetFactory(DbConnection)

Returns an instance of a DbProviderFactory.

GetFactory(DataRow)

Returns an instance of a DbProviderFactory.

GetFactory(String)

Returns an instance of a DbProviderFactory.

GetFactory(DbConnection)

Source:
DbProviderFactories.cs
Source:
DbProviderFactories.cs
Source:
DbProviderFactories.cs

Returns an instance of a DbProviderFactory.

public:
 static System::Data::Common::DbProviderFactory ^ GetFactory(System::Data::Common::DbConnection ^ connection);
public static System.Data.Common.DbProviderFactory? GetFactory (System.Data.Common.DbConnection connection);
public static System.Data.Common.DbProviderFactory GetFactory (System.Data.Common.DbConnection connection);
static member GetFactory : System.Data.Common.DbConnection -> System.Data.Common.DbProviderFactory
Public Shared Function GetFactory (connection As DbConnection) As DbProviderFactory

Parameters

connection
DbConnection

The connection used.

Returns

An instance of a DbProviderFactory for a specified connection.

Applies to

GetFactory(DataRow)

Source:
DbProviderFactories.cs
Source:
DbProviderFactories.cs
Source:
DbProviderFactories.cs

Returns an instance of a DbProviderFactory.

public:
 static System::Data::Common::DbProviderFactory ^ GetFactory(System::Data::DataRow ^ providerRow);
public static System.Data.Common.DbProviderFactory GetFactory (System.Data.DataRow providerRow);
static member GetFactory : System.Data.DataRow -> System.Data.Common.DbProviderFactory
Public Shared Function GetFactory (providerRow As DataRow) As DbProviderFactory

Parameters

providerRow
DataRow

DataRow containing the provider's configuration information.

Returns

An instance of a DbProviderFactory for a specified DataRow.

Remarks

The providerRow parameter corresponds to the DataRow of a table returned by GetFactoryClasses.

See also

Applies to

GetFactory(String)

Source:
DbProviderFactories.cs
Source:
DbProviderFactories.cs
Source:
DbProviderFactories.cs

Returns an instance of a DbProviderFactory.

public:
 static System::Data::Common::DbProviderFactory ^ GetFactory(System::String ^ providerInvariantName);
public static System.Data.Common.DbProviderFactory GetFactory (string providerInvariantName);
static member GetFactory : string -> System.Data.Common.DbProviderFactory
Public Shared Function GetFactory (providerInvariantName As String) As DbProviderFactory

Parameters

providerInvariantName
String

Invariant name of a provider.

Returns

An instance of a DbProviderFactory for a specified provider name.

Remarks

The providerInvariantName parameter corresponds to the InvariantName column of a table returned by GetFactoryClasses.

If you pass a value for providerInvariantName that's not valid, an exception is raised with the message, "Unable to find the requested .NET Framework Data Provider. It may not be installed."

See also

Applies to