Editing Rows in the Results Pane

Visual Database Tools

Visual Database Tools

Editing Rows in the Results Pane

In many cases, you can edit the data in the Results pane grid and save changes to the table or tables represented by the query. However, whether you can actually change, add, or delete rows depends on the type of query you have defined and on constraints, triggers, and permissions maintained by the database.

For details about the types of queries you can update, see Rules for Updating Results.

Note   You cannot update timestamp or binary columns using the Query Designer.

The Query Designer or View Designer can perform only minor validation of the data you enter in the Results pane. For example, if the price column of the titles table accepts only positive values, the Query Designer or View Designer might not enforce this restriction, and it would be possible to enter a negative value. However, when you save a row, the database will report an error if any column in the row contains invalid data.

To edit data in the Results pane

  1. Navigate to the cells containing the data you want to change.

Type in the new data. While you are editing, the leftmost column displays to indicate that the row is being edited.
While you are editing, the following rules apply:

  • When entering number, currency, time, or date information, use a format that will be recognized according to the specification in the Regional Settings dialog box in the Windows Control Panel.

  • To enter a NULL value into a cell, press CTRL+0.

  • You can edit a memo-type column (such as a text, memo, or long character column) if the column does not display <Long Text>. The Results pane can accept up to 900 characters of text in memo-type columns. If you are typing in a cell and exceed the amount of text that the Results pane can accept, the Query Designer will beep to indicate that you have exceeded this limit.

  • You cannot edit BLOB data.
  1. Save your changes by moving to another row in the grid.

    Note   The Query Designer or View Designer does not automatically save your changes if you switch to another pane. If you edit the current query (for example, by making a change in the Grid Pane), the Results pane is dimmed. However, it is still active, and you can still edit and save the row on which you had been working.

To cancel your changes for the current row, press ESC. If you press ESC while in a cell that you have changed, the changes for only that cell are canceled. If you press ESC while in a cell that you have not changed, the changes for the entire row are canceled and all the cells in that row revert to their old values.

It is possible that a result you are using conflicts with changes being made by other users. For example, you might be using the Results pane to edit a row while another user executes an Update query that modifies the row you are editing.

When you save the row you have edited, the Query Designer or View Designer compares the row against the version currently in the database. If there is a difference, a message appears indicating that the target row could not be located in the database.  You can run the query or view a second time to refresh the Results pane and see the other user's modifications.

See Also

Adding New Rows in the Results Pane | Deleting Rows in the Results Pane | Navigating in the Query Designer | Rules for Updating Results