Version

InitializeDataSource Method (FlatDataSourceAdapterBase)

Initializes the specified FlatDataSource.
Syntax
'Declaration
 
Protected MustOverride Sub InitializeDataSource( _
   ByVal dataSource As FlatDataSource, _
   ByVal connection As IDbConnection, _
   ByVal queryString As String, _
   ByVal cubeGenerationParams As CubeGenerationParameters, _
   ByVal fieldAttributeCallback As Func(Of String,Attribute()) _
) 

Parameters

dataSource
The FlatDataSource instance to be initialized.
connection
The previously opened database connection.
queryString
The query string which defines the record selection criteria.
cubeGenerationParams
A CubeGenerationParameters which controls the manner in which the resulting datacube is generated.
fieldAttributeCallback

An optional delegate which provides the ability to specify attributes for the property descriptor that is created for the recordset column. This method is called when a PropertyDescriptor is created for a column in the recordset created from the query, passing the name of the column. The value returned from the method is used to specify the attributes for the corresponding "property".

This delegate makes it possible to use the 'ByCategory' setting for the HierarchyDimensionGrouping property of the CubeGenerationParameters class; by providing a CategoryAttribute in the returned array, similar properties can be grouped together based on their category.

Note that the BrowsableAttribute can be used to hide a database field from the property list, by specifying false for the 'browsable' constructor parameter.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also