nerdexam
Microsoft

98-361 · Question #316

Your application includes a SqlDataAdapter object named sqlDataAdapter and an OleDbDataAdapter object named oledbdataAdapter. You need to connect to the Employees table of a SQL Server database…

The correct answer is D. sqlDataAdapter.Fill(dsEmployees, "Employees"). See the full explanation below for the reasoning.

Question

Your application includes a SqlDataAdapter object named sqlDataAdapter and an OleDbDataAdapter object named oledbdataAdapter. You need to connect to the Employees table of a SQL Server database. Your application also includes a DataSet object named dsEmployees. You need to load the data from the database into the DataSet object. You must select a solution that gives you the best performance. Which of the following lines of code should you choose?

Options

  • AdsEmployees = sqlDataAdapter.Fill("Employees");
  • BdsEmployees = oledbDataAdapter.Fill("Employees");
  • ColedbDataAdapter.Fill(dsEmployees, "Employees");
  • DsqlDataAdapter.Fill(dsEmployees, "Employees");

How the community answered

(21 responses)
  • A
    5% (1)
  • B
    14% (3)
  • C
    5% (1)
  • D
    76% (16)

Community Discussion

No community discussion yet for this question.

Full 98-361 Practice