70-516 · Question #54
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server 2008 database. You add the following store…
The correct answer is A. DataSet ds = new DataSet(); B. DataSet ds = new DataSet(). Fill(Int32, Int32, DataTable()) Adds or refreshes rows in a DataTable to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records. (Inherited from DbDataAdapter.) Fill(DataSet, Int32, Int32, String) Adds or…
Question
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server 2008 database. You add the following store procedure to the database. CREATE PROCEDURE GetProducts AS BEGIN SELECT ProductID, Name, Price, Cost FROM Product END You create a SqlDataAdapter named adapter to execute the stored procedure. You need to fill a DataTable instance with the first 10 rows of the result set. What are two possible code segments that you can use to achieve the goal?
Options
- ADataSet ds = new DataSet();
- BDataSet ds = new DataSet();
- CDataSet ds = new DataSet();
- DDataSet ds = new DataSet();
How the community answered
(31 responses)- A81% (25)
- C6% (2)
- D13% (4)
Explanation
Fill(Int32, Int32, DataTable()) Adds or refreshes rows in a DataTable to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records. (Inherited from DbDataAdapter.) Fill(DataSet, Int32, Int32, String) Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. (Inherited from SqlDataAdapter Class DataTable.ExtendedProperties Gets the collection of customized user information.
Topics
Community Discussion
No community discussion yet for this question.