November Happy Hour will be moved to Thursday December 5th.

Class SqlDataProvider

Inheritance
System.Object
SqlDataProvider
Namespace: Mediachase.Data.Provider
Assembly: Mediachase.SqlDataProvider.dll
Version: 12.17.2
Syntax
public class SqlDataProvider : DataProvider

Constructors

SqlDataProvider()

Declaration
public SqlDataProvider()

Properties

ApplicationName

Declaration
public override string ApplicationName { get; set; }
Property Value
Type Description
System.String
Overrides

CommandTimeOut

Gets the connection time out from the configuration.

Declaration
public override int CommandTimeOut { get; }
Property Value
Type Description
System.Int32

The connection time out.

Overrides

Methods

CreateDeleteCommand(DataCommand)

Declaration
protected SqlCommand CreateDeleteCommand(DataCommand command)
Parameters
Type Name Description
DataCommand command
Returns
Type Description
System.Data.SqlClient.SqlCommand

CreateInsertCommand(DataCommand)

Declaration
protected SqlCommand CreateInsertCommand(DataCommand command)
Parameters
Type Name Description
DataCommand command
Returns
Type Description
System.Data.SqlClient.SqlCommand

CreateLoadCommand(SqlCommand, DataCommand)

Declaration
protected string CreateLoadCommand(SqlCommand cmd, DataCommand command)
Parameters
Type Name Description
System.Data.SqlClient.SqlCommand cmd
DataCommand command
Returns
Type Description
System.String

CreateParameters(DataCommand)

Declaration
protected SqlCommand CreateParameters(DataCommand command)
Parameters
Type Name Description
DataCommand command
Returns
Type Description
System.Data.SqlClient.SqlCommand

CreateUpdateCommand(DataCommand)

Declaration
protected SqlCommand CreateUpdateCommand(DataCommand command)
Parameters
Type Name Description
DataCommand command
Returns
Type Description
System.Data.SqlClient.SqlCommand

ExecuteNonExec(DataCommand)

Declaration
public override DataResult ExecuteNonExec(DataCommand command)
Parameters
Type Name Description
DataCommand command
Returns
Type Description
DataResult
Overrides

ExecuteScalar(DataCommand)

Runs the return integer.

Declaration
public override DataResult ExecuteScalar(DataCommand command)
Parameters
Type Name Description
DataCommand command

The command.

Returns
Type Description
DataResult
Overrides

Initialize(String, NameValueCollection)

Initializes the provider.

Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type Name Description
System.String name

The friendly name of the provider.

System.Collections.Specialized.NameValueCollection config

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.

Exceptions
Type Condition
System.ArgumentNullException

The name of the provider is null.

System.InvalidOperationException

An attempt is made to call System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection) on a provider after the provider has already been initialized.

System.ArgumentException

The name of the provider has a length of zero.

LoadDataSet(DataCommand)

Executes a command resulting in a data set, and returns the data set.

Declaration
public override DataResult LoadDataSet(DataCommand command)
Parameters
Type Name Description
DataCommand command

The command to execute.

Returns
Type Description
DataResult

A data result containing the returned data set.

Overrides

LoadReader(DataCommand)

Executes a command, and returns a reader enumerating the results.

Declaration
public override DataResult LoadReader(DataCommand command)
Parameters
Type Name Description
DataCommand command

The command to execute.

Returns
Type Description
DataResult

A DataResult containing the result reader.

Overrides

LoadTable(DataCommand)

Executes a command resulting in a single table, and returns the table.

Declaration
public override DataTable LoadTable(DataCommand command)
Parameters
Type Name Description
DataCommand command

The command to execute.

Returns
Type Description
System.Data.DataTable

The returned table.

Overrides

LoadTableSchema(DataCommand)

Declaration
public override DataTable LoadTableSchema(DataCommand command)
Parameters
Type Name Description
DataCommand command
Returns
Type Description
System.Data.DataTable
Overrides

Run(DataCommand)

Runs the specified command.

Declaration
public override void Run(DataCommand command)
Parameters
Type Name Description
DataCommand command

The command.

Overrides

RunReturnInteger(DataCommand)

Runs the return integer.

Declaration
public override int RunReturnInteger(DataCommand command)
Parameters
Type Name Description
DataCommand command

The command.

Returns
Type Description
System.Int32
Overrides

Save(DataCommand)

Saves the data table.

Declaration
public override DataResult Save(DataCommand command)
Parameters
Type Name Description
DataCommand command

The command.

Returns
Type Description
DataResult

Returns either DataTable or DataRow[] depending on what was passed in the command

Overrides