ADO.NET Question:
Download Questions PDF

How can we load multiple tables in to Dataset?

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 Interview Questions And Answers PDF

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?