| Which method do you invoke on the Data Adapter control to load your generated dataset? |
| a) Fill( ) |
| b) ExecuteQuery( ) |
| c) Read( ) tell met eh answer |
Question
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Mar 25, 2012, 7:18 AM EDT
SenthilkumarRank #387 · 6.5K reputationPosted Mar 25, 2012, 7:30 PM EDT
The SqlDataAdapter class in the System.Data.SqlClient namespace, which is used to execute the query in the connected database to load the data.
The Fill is method in the SqlDataAdapter class which has the overloaded constructor where you can fill the result and pass the parameters.
Constructor Properties of Fill() Method:
- DataSet
- DataTable
- StartRecord
- MaxRecords
- SchemaTable
There is no ExecuteQuery method. But ExecuteNonQuery is method in the SqlCommand class. Which returns number of rows affected in the sql query. The Read() is method to read the rows in the SqlDataReader class.
You can get more information about SqlDataAdapter in the MSDN here:
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.aspx