Configuration Wizard

To open the SmartDataSource configuration wizard open the SmartDataSource smart tag panel and select the Configure Data Source...

Connection Tab

 

In the first tab Connection the connection string to be used is specified. You must specify a connection string in order to work with the Select, Update, Insert and Delete tabs.

The list on the left lists all connection strings that are specified in Web.config or have been previously used. You can also create a new connection string by selecting the New Connection button.

The details for the currently selected connection are displayed on the right side. If the connection is not stored in Web.config you can store it by selecting the Save in Web.Config button. The Configured checkbox indicates if the connection string is stored in Web.config.

 

Select, Update, Insert, Delete tabs

 

 

The Select, Update, Insert and Delete tabs display the respective sql statements and their parameters. On the top the text of the sql statement is displayed and can be manually edited.
The Show Query Builder button opens the Query Builder which allows easy visual sql command creation.
The Refresh Parameters button extracts all parameters from the sql statement.

The syntax for marking parameters in the sql statement is different for the different data providers.
For SqlClient it is like @paramname.
For ODBC and OLEDB providers the parameters are order-based and do not have names. They are marked with the '?' character. For this providers the position of the parameter is used to distinguish between two different parameters.
For Oracle provider the syntax is :paramname.

 

The extracted parameters of the command are displayed in the Parameters list. You can also manually add parameters with the Add Parameter button. When a parameter is selected its details are displayed on the right.

The parameter values can be filled from different sources - such as cookies, query parameters, control properties etc.

When the parameter is prefilled from a Control, you should switch to advanced mode ( by selecting the Show advanced properties) in order to set the Control ID property.  In simple mode the ControlID drop-down list is always empty.

 

The Select tab has an additional Generate button. This button generates the update, insert and delete statements  by interpreting the current select statement.

This functionality requires the selected database to be accessible.

 

Filter tab

Configures the FilterExpression and FilterParameters properties.  The filter expression is applied after the data is retrieved from the database. If you want to filter at database level you should use the Select tab.