Monday 21 September 2015

Experienced ADO.NETInterview Questions and Answers

16 :: what are the advantages and disadvantages of using datalist?
Adv: the DataList's display is defined via templates,DataList allows for much more customization of the rendered HTML markup , by which it is more user-friendly displays of data.

DisAdv:
adding such functionality with the DataList takes more development time than with the DataGrid, as,

1. The Edit/Update/Cancel buttons that can be created in a DataGrid via the EditCommandColumn column type, must be manually added to the DataList, and

2. The DataGrid BoundColumn column types automatically use a TextBox Web control for the editing interface, whereas with the DataList you must explicitly specify the editing interface for the item being edited via the EditItemTemplate.

3. we can't do the paging and sorting with datalist controls.

17 :: What is the difference between data reader and data adapter?
DateReader is an forward only and read only cursor type if you are accessing data through DataRead it shows the data on the web form/control but you can not perform the paging feature on that record(because it's forward only type). Reader is best fit to show the Data (where no need to work on data)DataAdapter is not only connect with the Databse(through Command object) it provide four types of command (InsertCommand, UpdateCommand, DeleteCommand, SelectCommand), It supports to the disconnected Architecture of .NET show we can populate the records to the DataSet. where as Dataadapter is best fit to work on data.

18 :: What is the difference between data reader and data set?
1) DataSet is disconnected object type. It uses XML to store data.
2) It fetches all data from the data source at a time
3) Modifications can be updated to the actual database
4) It will reduce the application performance.

19 :: Does SQLClient and OLEdb class share the same functionality?
No, each have its own functionality,
ex : for sql client , there is SqlConnection object
and for oledb client , there is OleDBConnection

20 :: why edit is not possible in repeater?
It has no such feature.

More Questions & Answers:-
Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8

No comments:

Post a Comment