Class SqlDataSource
Represents an SQL database to data items.
Inherited Members
Namespace: Telerik.Reporting
Assembly: Telerik.Reporting.dll
Syntax
public class SqlDataSource : DataSource, INamedObject, ICloneable, IEquatableDataSource, ISimpleDataSource, IDataSource, IConnectionDataSource
Constructors
SqlDataSource()
SqlDataSource(String, String)
Initializes a new instance of the SqlDataSource class.
Declaration
public SqlDataSource(string connectionString, string selectCommand)
Parameters
System.String
connectionString
Specifies the connection string used to connect to data. |
System.String
selectCommand
Specifies the SQL select statement or stored procedure to execute. |
SqlDataSource(String, String, String)
Initializes a new instance of the SqlDataSource class.
Declaration
public SqlDataSource(string providerName, string connectionString, string selectCommand)
Parameters
System.String
providerName
Specifies the managed provider name used to connect to data. |
System.String
connectionString
Specifies the connection string used to connect to data. |
System.String
selectCommand
Specifies the SQL select statement or stored procedure to execute. |
SqlDataSource(String, String, String, SqlDataSourceCommandType)
Initializes a new instance of the SqlDataSource class.
Declaration
public SqlDataSource(string providerName, string connectionString, string selectCommand, SqlDataSourceCommandType selectCommandType)
Parameters
System.String
providerName
Specifies the managed provider name used to connect to data. |
System.String
connectionString
Specifies the connection string used to connect to data. |
System.String
selectCommand
Specifies the SQL select statement or stored procedure to execute. |
SqlDataSourceCommandType
selectCommandType
Specifies how the select command string to be interpreted. |
Properties
CommandTimeout
Gets or sets the wait time in seconds before terminating the attempt to retrieve data.
Declaration
public int CommandTimeout { get; set; }
Property Value
System.Int32
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
public string ConnectionString { get; set; }
Property Value
System.String
|
Remarks
The ConnectionString property contains either a valid connection string or the name of a System.Configuration.ConnectionStringSettings in the application configuration file.
Parameters
Gets a collection with data source parameters.
Declaration
public SqlDataSourceParameterCollection Parameters { get; }
Property Value
SqlDataSourceParameterCollection
|
ProviderName
Gets or sets the managed provider name used to connect to data.
Declaration
public string ProviderName { get; set; }
Property Value
System.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.
SelectCommand
Gets or sets the SQL select statement or stored procedure to execute.
Declaration
public string SelectCommand { get; set; }
Property Value
System.String
|
SelectCommandType
Gets or sets a value indicating how the select command to be interpreted.
Declaration
public SqlDataSourceCommandType SelectCommandType { get; set; }
Property Value
SqlDataSourceCommandType
|
Remarks
One of the SqlDataSourceCommandType enumeration values. The default value of the SelectCommandType property is Text.