There are two ways to operate a database at the time of ADO, one when connected to the database in real time, and the second when disconnected.
The disconnected operation is implemented using SqlDataAdapter, where we want to load the table data in the database into the DataGridView control in WinForm, using a disconnect, and the following is the code implementation:
string " Data Source=.;i Nitial catalog=mydatabase;integrated security=true"; string " Select *from Employee " ; New SqlDataAdapter (SQL, server); New DataTable (); Sda. Fill (DT); = DT;
This allows us to easily implement loading data into the DataGridView control.
Here, Microsoft offers a powerful package of seemingly simple SqlDataAdapter and fill methods that encapsulate a range of operations including database connections and SQL execution objects.
ADO. NET database operations for disconnected data connections