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

Class DataProvider

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

Constructors

DataProvider()

Declaration
protected DataProvider()

Properties

ApplicationName

Gets or sets the name of the application.

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

The name of the application.

CommandTimeOut

Gets the connection time out from the configuration.

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

The connection time out.

Methods

ExecuteNonExec(DataCommand)

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

ExecuteScalar(DataCommand)

Runs the return integer.

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

The command.

Returns
Type Description
DataResult

LoadDataSet(DataCommand)

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

Declaration
public abstract 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.

LoadReader(DataCommand)

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

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

The command to execute.

Returns
Type Description
DataResult

A DataResult containing the result reader.

LoadReader(DataCommand, DateTimeKind)

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

Declaration
public virtual DataResult LoadReader(DataCommand command, DateTimeKind dateTimeKind)
Parameters
Type Name Description
DataCommand command

The command to execute.

System.DateTimeKind dateTimeKind

All DateTime values in the result will have dateTimeKind specified as the value of DateTime.Kind.

Returns
Type Description
DataResult

A DataResult containing the result reader.

LoadTable(DataCommand)

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

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

The command to execute.

Returns
Type Description
System.Data.DataTable

The returned table.

LoadTableSchema(DataCommand)

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

Run(DataCommand)

Runs the specified command.

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

The command.

RunReturnInteger(DataCommand)

Runs the return integer.

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

The command.

Returns
Type Description
System.Int32

Save(DataCommand)

Saves the data table.

Declaration
public abstract 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