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

How do you find the count of records in a dataset?

978


What is the default Timeout for SqlCommand.CommandTimeout property?

1013


What are the ado.net connection pooling parameters?

983


How to pass values into a datatable?

1138


Which is faster datareader or dataadapter?

992


Define the data provider classes that is supported by ado.net?

980


Compare Data Reader & Dataset in ado.net?

1001


can we create synonymn in ms access,sql server,my sql if so explain me with example

2087


how you will deal result set? How do you sort a dataset?If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?

1015


Which database is the ado.net sql connection object designed for?

1046


What is dataadapter in ado.net?

922


What are the steps you will take to improve performance?

894


How to enable and disable connection pooling?

1056


Which parameter of ConnectionString is used to specify the name of the database?

1061


What is disconnected data?

1044