Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to check the end of the record in Datareader?

Answer Posted / bhagwat prasad sharma

{vb.net code for selection by data reader}
//\\Start......

imports system.data.sqlclients

public class

dim con as new sqlconnection("server=bps; database=college; user id=sa; password=admin")

private button1 ()

dim str as string="select
name from student where roll_no=1"

dim cmd as new sqlcommand(str,con)

if con.state=connectionstate.closed than
con.open()

cmd.parameters.add("@roll_no",type.int)

cmd.parameters("@roll_no").value=txtroll.text

dim dr as sqldatareader

dr=cmd.executereader

if dr.read than

txtname.text=dr(1)

else

msgbox("selection error ")

end if

con.close()

end sub

end class

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between runtime version and version?

1039


What is the used of "ispostback" property?

1118


How long do session variables last?

956


Mention few asp.net validators.

1014


What is skin in asp.net?

956


What is server side session?

1005


What are tuples?

1136


Can we override the enablepartialrendering property of the scriptmanager class?

1125


How many types of validators are there in asp net?

962


Can more than one person use the same login?

970


Name some asp objects?

1012


I’m having some trouble with cas. How can I diagnose my problem?

1042


while developing webservices if i want some users to use my webservice only how can i give security to my webservice?

1856


What is session id in web application?

1095


How do I debug an asp.net application that was not written with visual studio.net and that does not use code-behind?

1008