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
How do you find the count of records in a dataset?
What is the default Timeout for SqlCommand.CommandTimeout property?
What are the ado.net connection pooling parameters?
How to pass values into a datatable?
Which is faster datareader or dataadapter?
Define the data provider classes that is supported by ado.net?
Compare Data Reader & Dataset in ado.net?
can we create synonymn in ms access,sql server,my sql if so explain me with example
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?
Which database is the ado.net sql connection object designed for?
What is dataadapter in ado.net?
What are the steps you will take to improve performance?
How to enable and disable connection pooling?
Which parameter of ConnectionString is used to specify the name of the database?
What is disconnected data?