| 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 |
Loading
| 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 |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Mar 25, 2012, 11:30 PM
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
VulpesPosted Mar 25, 2012, 11:18 AM