About ado.net components/objects. Usage of data adapters and
tell the steps to retrieve data ?

Answer Posted / kalirajan

ADO.NET Obj:

SqlConnection
SQlcommand
SqlDataReader
SqlDataAdapter
Dataset


Retrieving Data:

SqlConnection con = new SqlConnection("");
con.Open();
SqlCommand cmd = new SqlCommand("select * from Tbl", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bubbled event?

718


What is ado asp?

734


What is an ado?

728


Explain why edit is not possible in repeater?

763


What is the meaning of object pooling?

831


Which is faster sqldataadapter and sqldatareader?

695


What is row state?

702


Which namespaces are used for data access?

839


What is the current version of entity framework?

664


Explain the DataAdapter.Update() and DataSetAcceptChanges() methods.

733


What is the difference between linq and ado.net?

716


What is ole db query?

739


Define the executescalar method?

672


The answers which posted above is not satisfied my requirement? Can some one post teh exact answer? Thanx

1792


Which provider is used to connect ms access, oracle, etc…?

725