Updating a recordset

26-Nov-2014 01:26

Please read the Microsoft KB article link provided at the conclusion of this tutorial.This tutorial shows various ways you can update the record in a single table.Often to satisfy business requirements there arises a need to change some value or values in a table or tables.Sometimes it may be to make a change to a large number of records, and sometimes the change will only be applied to individual records — updating a person’s last name or phone number, for example.Future articles will consider cases where more than one table may be involved.This article uses a table created out of choosing only a few columns from a table in the Northwind database to keep the discussion simple without compromising the concept.Updating the query requires the table, the criterion for which the changes have to be made and the changes themselves.

updating a recordset-17updating a recordset-90

After the table was created a primary key was added so that a form and data access page based update can be described. If you right click the little black rectangle at the top left corner, you can access the form’s properties as shown.

These queries can be created using the query designer tool.

Creating an update query using the designer is really very simple. Right click the border between the design and grid to pop open the window with several menu items as shown. The grid changes somewhat, allowing to choose which column or columns you need in the table, and showing you where you can type in the changes as shown.

The value that exists before the Update Query is executed is shown in the next picture .

After making entries, when you try to close the query editor, you will be asked whether you want to save and you may give a name to the query.

After the table was created a primary key was added so that a form and data access page based update can be described. If you right click the little black rectangle at the top left corner, you can access the form’s properties as shown.

These queries can be created using the query designer tool.

Creating an update query using the designer is really very simple. Right click the border between the design and grid to pop open the window with several menu items as shown. The grid changes somewhat, allowing to choose which column or columns you need in the table, and showing you where you can type in the changes as shown.

The value that exists before the Update Query is executed is shown in the next picture .

After making entries, when you try to close the query editor, you will be asked whether you want to save and you may give a name to the query.

The Table row shows the name of the table that contains the field.