In this article, we will discuss what is a DataAdapter in asp.net and how to use DataAdapter in asp.net.
Also, you can check out my previous posts on
DataAdapter will act as a mediator between dataset and database server. This will perform 2 things:
– It will read data from database and place within dataset in the form of datatables.
– The manipulation on the dataset table will be updated with database.
string conn = “You connection string will goes here”;
string strSQL = “SELECT * FROM EMPLOYEES”;
SqlConnection conn = new SqlConnection(conn);
SqlDataAdapter da = new SqlDataAdapter(strSQL, conn);
DataSet ds = new DataSet();
Here Employees is the datatable name.
Check out the below diagram how it is working:
You May Also like the Following SharePoint Tutorials: