ADO.NET Question:

How can we load multiple tables in to Dataset?

Tweet Share WhatsApp

Answer:

DataSet ds=new DataSet();

SqlDataAdapter dap=new SqlDataAdapter(Select * from <tablename>,<connection1>);

dap.Fill(ds,"TableOne");

SqlDataAdapter dap1=new SqlDataAdapter(Select * from <tablename>,<connection1>);

dap1.Fill(ds,"tableTwo");

Download ADO.NET PDF Read All 42 ADO.NET Questions
Previous QuestionNext Question
Which one of the following objects is a high-level abstraction of the Connection and Command objects in ADO.NET?What is connection String?