As you know, there are frequent modifications in database tables in real life.
These may include insertions, updates and deletions.
Ways to do this but Requires the SQLDatasource bound to the gridview Method Nr1 Method Nr2 How will you go about updating the database after editing the gridview? Thanks protected void Page_Load(object sender, Event Args e) protected void grd View Details_Row Editing1(object sender, Grid View Edit Event Args e) protected void grd View Details_Row Updating(object sender, Grid View Update Event Args e) , or forgotten $.
Data Adapter works as a bridge between a Data Set and data source, using Data Adapter we can fill dataset, datatable etc.
There are three other properties including Update Command, Add Command and Delete Command.
All these commands would make changes in the database.
This is the scenario (Delphi XE2 32 bit, I have attached a small text file that contains code snippets related to this question): - One Access database (single table) used with a TADOQuery - All records are SELECTed with a very simple SQL statement - A Quantumgrid with three views, but for the moment we can concentrate on the first view only that is very plain vanilla The cell layout is: - One unbound checkbox (Greyed not allowed) inserted as the first cell and as explained in one of the questions found here - The checkboxes are all set to checked at startup (see attached code) - The datacontroller of this view has Immediate Post = True and also the checkbox has Immediate Post = True since I want that the state changes with only one mouse click. It works without problems and I can check and uncheck rows just as I wanted.
Datasets store a copy of data from the database tables.
If we see diagrammatically, As we said, our first task is to create a connection to database.
We would explore later that there is no need of opening and closing database connection explicitly while you deal with Data Adapter objects.
Data Adapter is basically a class that represents a set of SQL commands with a database connection property, the fill method is used for updating data source There are different types of Data Adapter for different datasource in Ado.net, Sql Data Adapter, Ole Db Data Adapter, Oracle Data Adapter etc.