Language

SqlClientFactory Class

Definition

Represents a set of methods for creating instances of the System.Data.SqlClient provider's implementation of the data source classes.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

public ref class SqlClientFactory sealed : System::Data::Common::DbProviderFactory
public ref class SqlClientFactory sealed : System::Data::Common::DbProviderFactory, IServiceProvider
public sealed class SqlClientFactory : System.Data.Common.DbProviderFactory
public sealed class SqlClientFactory : System.Data.Common.DbProviderFactory, IServiceProvider
type SqlClientFactory = class
    inherit DbProviderFactory
type SqlClientFactory = class
    inherit DbProviderFactory
    interface IServiceProvider
Public NotInheritable Class SqlClientFactory
Inherits DbProviderFactory
Public NotInheritable Class SqlClientFactory
Inherits DbProviderFactory
Implements IServiceProvider
Inheritance
SqlClientFactory
Implements

Fields

Name Description
Instance

Gets an instance of the SqlClientFactory. This can be used to retrieve strongly typed data objects.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

Properties

Name Description
CanCreateDataSourceEnumerator

Gets a value that indicates whether a SqlDataSourceEnumerator can be created.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

Methods

Name Description
CreateCommand()

Returns a strongly typed DbCommand instance.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

CreateCommandBuilder()

Returns a strongly typed DbCommandBuilder instance.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

CreateConnection()

Returns a strongly typed DbConnection instance.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

CreateConnectionStringBuilder()

Returns a strongly typed DbConnectionStringBuilder instance.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

CreateDataAdapter()

Returns a strongly typed DbDataAdapter instance.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

CreateDataSourceEnumerator()

Returns a new SqlDataSourceEnumerator.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

CreateParameter()

Returns a strongly typed DbParameter instance.

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

CreatePermission(PermissionState)

Returns a new CodeAccessPermission.

This API supports .NET Framework code access security. For new database development, use Microsoft.Data.SqlClient; retain this API for applications that require .NET Framework code access security.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

Name Description
IServiceProvider.GetService(Type)

For a description of this member, see GetService(Type).

For new development, use Microsoft.Data.SqlClient. This page documents System.Data.SqlClient.

Applies to

See also