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...

Why sql Data Reader object not created

Answer Posted / kalirajan

SqlConnection con = new SqlConnection("");
con.Open();
SqlCommand cmd = new SqlCommand("", con);

SqlDataReader dr;

dr = cmd.ExecuteReader();
while (dr.Read())
{
TextBox1.Text = dr[0].ToString();


}

dr.Close();


Try this code...

Is This Answer Correct ?    8 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of a .net application which connects to microsoft access database using ado.net classes.

1078


Explain how to call the sql commands asynchronously in ado.net version 2.0?

886


What are the Data providers in ADO.Net?

956


What is ole db query?

925


Explain the difference between an ado.net dataset and an ado recordset?

997


What is partial class?

924


Define data adapter?

896


What is the difference between SqlCommand and SqlCommandBuilder?

1003


What is difference between connected and disconnected architecture in ado.net?

1101


What are the advantages of ado.net?

854


What is sqldatareader?

880


How to retrieve the user id which is provided while windows authentication?

1053


Explain how do you connect to sql server database without using sqlclient?

943


Which architecture does Datasets follow?

987


What is Data Provider?

991