nerdexam
Microsoft

98-361 · Question #317

Your application includes a SqlDataAdapter object named sqlDataAdapter that connects to the Employees table. You use the Fill method to retrieve the data from the Employees table. The…

The correct answer is C. The Fill method will open the connection, read the data, and leave the connection closed. See the full explanation below for the reasoning.

Question

Your application includes a SqlDataAdapter object named sqlDataAdapter that connects to the Employees table. You use the Fill method to retrieve the data from the Employees table. The SqlDataAdapter's Connection property is set to a valid connection to the SQL Server database, but the connection is in the closed state. Which of the following statements is true about the working of the Fill method?

Options

  • AThe Fill method will throw an exception because the connection is closed.
  • BThe Fill method will open the connection, read the data, and leave the connection open.
  • CThe Fill method will open the connection, read the data, and leave the connection closed.
  • DThe Fill method will return an emptyresult setbecause the connection is closed.

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    9% (3)
  • C
    82% (28)
  • D
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 98-361 Practice