Sunday, 1 February 2015

Filtering Data Using Control Of a windows From

Filtering Data Using Control Of a windows From
After the data is retrieved from a data source by binding the data to a control of a windows from,you can filter this data to view selective record. This can be done in two ways. First parameterized queries can be passed to filter the data on the basis of a criterion. Second,with the help of controls in a Windows from, data can be filtered to view selective record.
Consider an example, where the sales manager of an organization wants to view the sales information of various stores in a grid format. This data can be displayed by establishing the connection to the database and binding the data by using the DATAGRIDVIEW control.

Querying Databases Using ADO. NET

Querying Databases Using ADO. NET
NET based data-centric application make use of ADO.NET to make connection to a database to retrieve and update data. Depending  upon the requirments,the data can be displayed in a customized formet in a windows application. This customized formet can be displayed by binding data source to a control of a windows from. Such binding of data to a control is known as data binding.

Working With Command Objects

Working With Command Objects
A Command object is a specific command that is used to manipulate data in a data source. It is an object representing a DML statement or a stored procedure that is used to retrieve,insert,delet,or modify data in a data source. A data command is an instance of the oledbcommand OR sqlcommand Class. A data command derived from the oledBcommand class can be used to work with any OLE DB provider,whereas a data command derived from the sqlcommand class can be used to access data from a SQL Server.
To retrieve data by using data commands,first a connectoin object is created to connect to the database from where data is to be retrieved. Then,a Command object is created. To access a data sourse,a data command should provide information about the connection for communicating with the data sourse,the DML statement or the name of the stored procedure to execute,and the parameters that may be required for execution of the data command.
The two type of operations performed by a command object to retrieve and modify data in a data sourse are:
- Synchronous operations
- Asynchronous operations