Free Practice Exam - MCPD 70-562
Control Panel
Exam Progress
Move on to the next question
Links
Home
Microsoft Exams
Question 10
As part of a new web application for your IT department you are creating a ‘quick and dirty’ web page that displays data about hardware changes in the last 14 days. This page contains an SqlDataAdaptor object named sqlDataAdaptor1 that you created by dragging and dropping the Hardware table from your SQL database onto the form. Your application also includes a DataSet object called dsHardware.
What line of code should you use to load the data from the database into the DataSet object?
sqlDataAdaptor1.Fill(dsHardware, ‘Hardware’)
dsHardware = sqlDataAdaptor1.Fill('Hardware')
sqlDataAdaptor1.Fill( 'dsHardware', 'Hardware')
sqlDataAdaptor1.Fill('dsHardware')
That was the correct answer, well done!
Sorry, that was the wrong answer
The correct answer is sqlDataAdaptor1.Fill(dsHardware, ‘Hardware’). When you call the Fill() method of the SqlDataAdaptor object you must specify the DataSet object to fill and the table name as a string to collect the data from.
Sponsored
Free practice exams are provided free of charge by Accelerated Ideas. Please respect our exams and do not reproduce our material or abuse the testing system. Thank you. Microsoft exams for MCPD, MCTS, MCP, MCSE, MCSA, MCAD, MCSD