Databases Reference
In-Depth Information
C#
Using System;
using Microsoft.ReportingServices.DataProcessing;
using FCLData = System.Data;
namespace Wrox.ReportingServices.DataSetDataExtension
{
public class DataSet ClassName
{
}
}
VB.NET
Imports System
Imports Microsoft.ReportingServices.DataProcessing
Imports FCLData = System.Data
Namespace Wrox.ReportingServices.DataSetDataExtension
Public Class DataSet ClassName
End Class
End Namespace
Creating the DataSetConnection Object
The connection object is responsible for connecting to the data source and providing a mechanism for
accessing both the data processing extension-specific transaction and command objects. These responsibilities
are enforced through the IDbConnection interface. Because the connection object is the extension entry
point and will be the first object in the extension that will deal with SQL Reporting Services, it also is
required to support Iextension, as discussed previously. Because the connection object is usually
responsible for connecting to a unmanaged resource, it is required to implement IDisposable. The
aggregate interface for all these others is IDbConnectionExtension, which is what you will implement.
A diagram created with the new Visual Studio class designer is in Figure 13-6 shown below. Having the
class designer within Visual Studio makes it easier both to implement and understand the relationships
between objects in a complex system.
To add the DataSetConnection class to the project, choose Project
Add Class from the menu. Change
the name of the class to DataSetConnection. Open the file, and indicate that the class should implement
the IDbConnection Extension interface, as discussed earlier. Visual Studio will jump in and create all
of the wrapper methods for you. Because you will be doing file IO and using regular expressions to
parse your ConnectionString property, you need to add those namespaces to this class.
Search WWH ::




Custom Search