Why Datareader is useful?

Answer Posted / payal

1)it is used for forward record only.

2)we cannot update or save

3)speed is fast than dataset

4)not persist any record

5)it is usefual in case of display data according to
critiera on form using control like textbox,label etc.

who to use

in vb.net
dim sqlcmd as new sqlcmd("select ename from tblemp where
empid=5;
dim dr as new dataReader
dr=sqlcmd.executeReader()
if dr.hasRows then
txtbox1.text(dr("ename"))
end if

this display ename in textbox.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you define a read only property in a class module?

531


What is difference between inline and code behind?

521


what is the advantage of option strict on?

612


Tell me how many .net languages can a single .net dll contain?

529


What is early binding?

530






Explain the difference between system.string and system.stringbuilder classes?

537


Why should you use delegate?

477


What is the class that allows an element to be accessed using unique key?

547


Explain the advantage of option strict on?

533


What is different between web.config and machine.config and where it will be ?

560


Name a feature which is common to all .net languages?

584


What are the different types of Lock available in Visual Basic?

640


i have two class that contain's two methods as same name in derived class i have to call these two methods what will happen at run time ?

2244


What is strong typing and weak typing?

547


difference between checkbox vs radiobutton??

2494