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

List the 4 common ado.net namespaces?

697


Which database is the ado.net?

496


What is ado recordset?

494


Which is the feature of ado.net?

517


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

476






What is a control toolbox?

499


Define executenonquery?

517


What is ado.net components?

501


What is difference between executequery and executeupdate?

496


How to create dynamic gridview?

588


Which object is used to add relationship between two Datatables?

573


What is difference in record set and dataset?

529


How can we check that some changes have been made to dataset since it was loaded?

512


What Is Difference Between Ado And Ado.net?

556


How to add a check box or a dropdown list to a column in a datagrid?

531