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



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

Answer / 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

More ADO.NET Interview Questions

What provider ado.net use by default? Explain the role of data provider in ado.net?

0 Answers  


What are the major challenges in accessing data from a database?

0 Answers  


What are all the different methods under sqlcommand?

0 Answers  


Why do we use sqldataadapter?

0 Answers  


Command objects uses, purposes and their methods.

0 Answers  






Can datareader hold data from multiple tables?

0 Answers  


Do we use stored procedure in ADO.Net?

0 Answers  


What is typed dataset ?

0 Answers   NA,


What is ado.net components?

0 Answers  


What is linq and entity framework?

0 Answers  


how to display empty table to datagrid

3 Answers   LG Soft,


What DataReader class do in ADO.NET ?

0 Answers   NA,


Categories