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

what is common type system?

694


What is the Advantage of vb.net over vb

764


What is the difference between import system.data.sqlclient and system.data.oledb?

723


What is break mode? What are the options to step through code?

763


What is the difference between readonly variable and constant variable?

762


Explain jit?

735


Explain option explicit?

767


Can we use Vb.Net and C# language simultaneously in one .Net application?

780


Explain about the feature anonymous type?

788


Explain some of the exclusive features which are present in vb?

705


What is internal keyword in .net framework?

812


Explain about branching logic control in vb.net?

711


What is the significance of delegates?

705


how to get dynamic control array position or its index position?

2238


what is difference between web.config and machine.config and where it will be ?

703