ClassSqlDataSource
Represents an SQL database to data items.
Definition
Namespace:Telerik.Reporting
Assembly:Telerik.Reporting.dll
Syntax:
public class SqlDataSource : DataSource, IDataSource
Inheritance: objectMarshalByRefObjectComponentDataSourceSqlDataSource
Implements:
Inherited Members
Constructors
SqlDataSource()
Initializes a new instance of the SqlDataSource class.
Declaration
public SqlDataSource()
SqlDataSource(string, string)
Initializes a new instance of the SqlDataSource class.
Declaration
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
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
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
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
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
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
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
public SqlDataSourceParameterCollection Parameters { get; }
Property Value
ProviderName
Gets or sets the managed provider name used to connect to data.
Declaration
[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
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
public string SelectCommand { get; set; }
Property Value
string
SelectCommandType
Gets or sets a value indicating how the select command to be interpreted.
Declaration
public SqlDataSourceCommandType SelectCommandType { get; set; }
Property Value
Remarks
One of the SqlDataSourceCommandType enumeration values. The default value of the SelectCommandType property is Text.