|
// File: DataSetConnection.cs
using System;
using System.Diagnostics;
using Data = System.Data;
using Microsoft.ReportingServices.DataProcessing;
using Microsoft.ReportingServices.Interfaces;
namespace CustomDataExtension
{
/// <summary>
/// </summary>
public class DataSetConnection : IDbConnection, IExtension
{
#region Properties
private string _connectionString;
private System.Data.ConnectionState _connectionState = System.Data.ConnectionState.Closed;
private string _localizedName = "Custom Data Extension";
/// <summary>
/// Gets/sets the connection string
/// </summary>
/// <remarks>
/// ToDo
/// </remarks>
public String ConnectionString
{
get { return (this._connectionString); }
set { this._connectionString = value; }
}
/// <summary>
/// Gets the connection timeout.
/// </summary>
/// <remarks>
/// This extension does not currently support a timeout so will always return 0.
/// </remarks>
public Int32 ConnectionTimeout
{
get { return (0); }
}
/// <summary>
/// TODO
/// </summary>
public System.Data.ConnectionState State
{
get
{
return _connectionState;
}
}
/// <summary>
/// TODO
/// </summary>
public string LocalizedName
{
get { return _localizedName; }
set { _localizedName = value; }
}
#endregion
/// <summary>
/// Signals the begin of a transaction
/// </summary>
/// <returns>null since we do not support transactions</returns>
public IDbTransaction BeginTransaction ()
{
return (null);
}
/// <summary>
/// Opens the connection (not used)
/// </summary>
public void Open ()
{
//Debug.WriteLine("Connection :: Open()");
}
/// <summary>
/// Closes the connection (not used)
/// </summary>
public void Close () {}
/// <summary>
/// Creates a IDbCommand object
/// </summary>
/// <returns>A new IDbCommand</returns>
public IDbCommand CreateCommand ()
{
//Debug.WriteLine("Connection :: CreateCommand()");
return new DataSetCommand();
}
/// <summary>
/// TODO
/// </summary>
/// <param name="configuration"></param>
public void SetConfiguration(string configuration) {}
/// <summary>
/// Dispose of any held resources
/// </summary>
public void Dispose() {}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Years of software consulting and software development using Microsoft development products such as Microsoft Content Management System, SQL Server Reporting Service, ASP.Net C# VB.Net, HTML and javascript web development, Visual Studio add-on development, C++ MFC/ATL and COM+ development, and ActiveX components.