Class
SqlDataSource

Represents an SQL database to data items.

Definition

Namespace:Telerik.Reporting

Assembly:Telerik.Reporting.dll

Syntax:

cs-api-definition
public class SqlDataSource : DataSource, IDataSource

Inheritance: objectMarshalByRefObjectComponentDataSourceSqlDataSource

Implements: IDataSource

Inherited Members DataSource.NameDataSource.DescriptionDataSource.CalculatedFields

Constructors

SqlDataSource()

Initializes a new instance of the SqlDataSource class.

Declaration

cs-api-definition
public SqlDataSource()

SqlDataSource(string, string)

Initializes a new instance of the SqlDataSource class.

Declaration

cs-api-definition
public SqlDataSource(string connectionString, string selectCommand)

Parameters

connectionString

string

Specifies the connection string used to connect to data.

selectCommand

string

Specifies the SQL select statement or stored procedure to execute.

SqlDataSource(string, string, string)

Initializes a new instance of the SqlDataSource class.

Declaration

cs-api-definition
public SqlDataSource(string providerName, string connectionString, string selectCommand)

Parameters

providerName

string

Specifies the managed provider name used to connect to data.

connectionString

string

Specifies the connection string used to connect to data.

selectCommand

string

Specifies the SQL select statement or stored procedure to execute.

SqlDataSource(string, string, string, SqlDataSourceCommandType, string)

Initializes a new instance of the SqlDataSource class.

Declaration

cs-api-definition
public SqlDataSource(string providerName, string connectionString, string selectCommand, SqlDataSourceCommandType selectCommandType, string schemaRestrictions)

Parameters

providerName

string

Specifies the managed provider name used to connect to data.

connectionString

string

Specifies the connection string used to connect to data.

selectCommand

string

Specifies the SQL select statement or stored procedure to execute.

selectCommandType

SqlDataSourceCommandType

Specifies how the select command string to be interpreted.

schemaRestrictions

string

Specifies the schema restrictions used by the query builder while resolving the database schema.

SqlDataSource(string, string, string, string)

Initializes a new instance of the SqlDataSource class.

Declaration

cs-api-definition
public SqlDataSource(string providerName, string connectionString, string selectCommand, string schemaRestrictions)

Parameters

providerName

string

Specifies the managed provider name used to connect to data.

connectionString

string

Specifies the connection string used to connect to data.

selectCommand

string

Specifies the SQL select statement or stored procedure to execute.

schemaRestrictions

string

Specifies the schema restrictions used by the query builder while resolving the database schema.

Properties

CommandTimeout

Gets or sets the wait time in seconds before terminating the attempt to retrieve data.

Declaration

cs-api-definition
public int CommandTimeout { get; set; }

Property Value

int

The time in seconds to wait before terminating the attempt to retrieve data. The default value of the CommandTimeout property is 30 seconds.

Remarks

The provided value should be valid for the currently used data provider.

ConnectionString

Gets or sets the connection string used to connect to data.

Declaration

cs-api-definition
public string ConnectionString { get; set; }

Property Value

string

Remarks

The ConnectionString property contains either a valid connection string or the name of a ConnectionStringSettings in the application configuration file.

Parameters

Gets a collection with data source parameters.

Declaration

cs-api-definition
public SqlDataSourceParameterCollection Parameters { get; }

Property Value

SqlDataSourceParameterCollection

ProviderName

Gets or sets the managed provider name used to connect to data.

Declaration

cs-api-definition
[TypeConverter("Telerik.Reporting.Data.Design.DataProviderNameConverter, Telerik.Reporting.Design, Version=20.0.26.211, Culture=neutral, PublicKeyToken=a9d7983dfcc261be")]
public string ProviderName { get; set; }

Property Value

string

Remarks

If the ProviderName property is set to null (Nothing in Visual Basic) or an empty string, the default provider is System.Data.SqlClient.

SchemaRestrictions

Gets or sets the schema restrictions used by the query builder while resolving the database schema.

Declaration

cs-api-definition
public string SchemaRestrictions { get; set; }

Property Value

string

Remarks

A comma-separated list of schema restrictions used to limit the amount of information returned. The position of each item in the list is equivalent to the restriction number.

SelectCommand

Gets or sets the SQL select statement or stored procedure to execute.

Declaration

cs-api-definition
public string SelectCommand { get; set; }

Property Value

string

SelectCommandType

Gets or sets a value indicating how the select command to be interpreted.

Declaration

cs-api-definition
public SqlDataSourceCommandType SelectCommandType { get; set; }

Property Value

SqlDataSourceCommandType

Remarks

One of the SqlDataSourceCommandType enumeration values. The default value of the SelectCommandType property is Text.