Back to Devexpress

SqlDataSource Members

corelibraries-devexpress-dot-dataaccess-dot-sql-dot-sqldatasource-dot-underscore-members.md

latest19.3 KB
Original Source

SqlDataSource Members

The data source that allows you to bind data-aware controls to a database (in read-only mode) using specified data connection options.

Constructors

NameDescription
SqlDataSource(DataConnectionParametersBase)Initializes a new instance of the SqlDataSource class with the specified connection parameters.
SqlDataSource(String)Initializes a new instance of the SqlDataSource class with the specified connection name.

Fields

NameDescription
KeepConnectionOpen staticObsolete. Use the ConnectionOptions.CloseConnection property instead.

Properties

NameDescription
AllowCustomSqlQueries staticSpecifies whether a user can add custom SQL queries to fill the SqlDataSource.
CanRaiseEvents protectedGets a value indicating whether the component can raise an event. Inherited from Component.
ConnectionProvides access to the data connection settings of the SqlDataSource.
ConnectionNameSpecifies the name of a data connection in the App.config file.
ConnectionOptionsProvides access to the data connection options of the SqlDataSource.
ConnectionParametersSpecifies the data connection settings of the SqlDataSource.
ContainerGets the IContainer that contains the Component. Inherited from Component.
DBSchemaGets the schema of the connected SQL data source.
DesignMode protectedGets a value that indicates whether the Component is currently in design mode. Inherited from Component.
DisableCustomQueryValidation staticGets or sets whether the validation of custom SQL queries is performed.
Events protectedGets the list of event handlers that are attached to this Component. Inherited from Component.
NameInherited from DataComponentBase.
QueriesProvides access to the collection of queries defined for the SqlDataSource.
RelationsProvides access to the collection of master-detail relations of the SqlDataSource.
RemoveCommentsBeforeExecution static
ResultGets a collection of tables and their relations from the current SqlDataSource.
SiteGets or sets the ISite of the Component. Inherited from Component.

Methods

NameDescription
ClearRows()Clears all data cached when filling the SqlDataSource, preserving the information about the original structure of tables, columns and data relations.
CreateObjRef(Type)Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. Inherited from MarshalByRefObject.
Dispose()Releases all resources used by the Component. Inherited from Component.
Equals(Object, Object) staticDetermines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object)Determines whether the specified object is equal to the current object. Inherited from Object.
Fill()Validates and executes all valid queries available in the SqlDataSource.Queries collection.
Fill(IEnumerable<IParameter>, String[])Validates and executes the specified queries with the required parameters.
Fill(IEnumerable<IParameter>)Validates and executes all valid queries available in the SqlDataSource.Queries collection with the specified parameters.
Fill(String[])Validates and executes the specified queries.
FillAsync()Populates the SqlDataSource in an asynchronous manner.
FillAsync(IEnumerable<IParameter>, String[], CancellationToken)Populates the SqlDataSource in an asynchronous manner, passes external parameters to the data source, and uses the cancellationToken parameter to send the cancellation signal. You can specify which queries to execute in order to populate the data source.
FillAsync(IEnumerable<IParameter>, String[])Populates the SqlDataSource in an asynchronous manner and passes external parameters to the data source. You can specify which queries to execute in order to populate the data source.
FillAsync(IEnumerable<IParameter>, CancellationToken)Populates the SqlDataSource in an asynchronous manner, passes external parameters to the data source, and uses the cancellationToken parameter to send the cancellation signal.
FillAsync(IEnumerable<IParameter>)Populates the SqlDataSource in an asynchronous manner and passes external parameters to the data source.
FillAsync(String[], CancellationToken)Populates the SqlDataSource in an asynchronous manner and uses the cancellationToken parameter to send the cancellation signal. You can specify which queries to execute in order to populate the data source.
FillAsync(String[])Populates the SqlDataSource in an asynchronous manner. You can specify which queries to execute in order to populate the data source.
FillAsync(CancellationToken)Populates the SqlDataSource in an asynchronous manner and uses the cancellationToken parameter to send the cancellation signal.
GetHashCode()Serves as the default hash function. Inherited from Object.
GetLifetimeService()Retrieves the current lifetime service object that controls the lifetime policy for this instance. Inherited from MarshalByRefObject.
GetService(Type)Inherited from DataComponentBase.
GetType()Gets the Type of the current instance. Inherited from Object.
InitializeLifetimeService()Obtains a lifetime service object to control the lifetime policy for this instance. Inherited from MarshalByRefObject.
LoadFromXml(XElement)Loads the SQL data source schema definition from XML.
MemberwiseClone() protectedCreates a shallow copy of the current Object. Inherited from Object.
MemberwiseClone(Boolean) protectedCreates a shallow copy of the current MarshalByRefObject object. Inherited from MarshalByRefObject.
RebuildResultSchema()Validates and updates the result schema available on the client after query execution (it can be accessed using the SqlDataSource.Result property). This command does not affect the actual database schema on the server.
RebuildResultSchema(IEnumerable<IParameter>)Validates and updates the result schema available on the client after query execution with the specified parameters (the result schema can be accessed using the SqlDataSource.Result property). This command does not affect the actual database schema on the server.
RebuildResultSchema(Predicate<IEnumerable<SqlQuery>>, IEnumerable<IParameter>, IEnumerable<SqlQuery>)Validates and updates the result schema available on the client with the specified queries and parameters after confirming the execution of associated queries (the result schema can be accessed using the SqlDataSource.Result property). This command does not affect the actual database schema on the server.
RebuildResultSchema(Predicate<IEnumerable<SqlQuery>>, IEnumerable<IParameter>)Validates and updates the result schema available on the client with the specified parameters after confirming the execution of associated queries (the result schema can be accessed using the SqlDataSource.Result property). This command does not affect the actual database schema on the server.
RebuildResultSchema(Predicate<IEnumerable<SqlQuery>>)Validates and updates the result schema available on the client after confirming the execution of associated queries (the result schema can be accessed using the SqlDataSource.Result property). This command does not affect the actual database schema on the server.
ReferenceEquals(Object, Object) staticDetermines whether the specified Object instances are the same instance. Inherited from Object.
SaveToXml()Saves the XML definition of the SQL data source schema.
ToString()Returns a String containing the name of the Component, if any. This method should not be overridden. Inherited from Component.

Events

NameDescription
BeforeLoadProviderCustomAssemblyOccurs on an attempt to load a provider custom assembly (the FireBirdConnectionParameters.ClientLibrary property value) by the Firebird data provider for a specific SQL data source.
BeforeLoadProviderCustomAssemblyGlobal staticOccurs on an attempt to load a provider custom assembly (the FireBirdConnectionParameters.ClientLibrary property value) by the Firebird data provider for SQL data sources.
ConfigureDataConnectionAllows you to customize connection settings before connecting to a database.
ConnectionErrorFires after an attempt to establish a data connection has failed.
CustomizeFilterExpressionAllows you to include WHERE clauses in SQL queries.
DisposedOccurs when the component is disposed by a call to the Dispose() method. Inherited from Component.
ValidateCustomSqlQueryChecks the validity of the custom SQL query used to supply the data source with data.
ValidateCustomSqlQueryGlobal staticProvides the capability to check the validity of the custom SQL query used to supply SQL data sources with data.

See Also

SqlDataSource Class

DevExpress.DataAccess.Sql Namespace