Compartir a través de


How to: Delete Data in "Quadrant"

[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]

This topic shows how to delete a record from a table. This tutorial uses sample data that is installed in How to: Install the "Quadrant" Sample Data.

To delete a record

  1. If you have not connected to the Repository database before, use the steps outlined in How to: Connect to a SQL Server Database with "Quadrant" to connect to the Repository database.

  2. If you have connected to the Repository database before, on the View menu, click Explorer, and click Repository.

  3. In the Explorer, click the Database node to expand it.

  4. Click the Microsoft.Samples.Organization node and double-click the Events node to open it in a new workpad, which displays all the events’ records in a table view.

  5. In the Events workpad, select a row to delete.)

  6. On the Data menu, click Delete Item. Alternatively, right-click the row and select Delete Item. Notice that the row is struck out in the table.

    Note

    You cannot delete a record that references data in other tables by using a foreign key. If you attempt to do so, an error will occur when you try to commit the change. The error details can be viewed by double-clicking Errors (n) in the lower-right corner of the screen.

  7. On the File menu, click Save Changes to commit this deletion to the database. Note that the row disappears from the table.

To delete a folder

  1. In the Explorer, expand the Organization folder.

  2. Select the People folder.

  3. On the Data menu, click Delete Item. Alternatively, click the X on the right of the folder name, or right-click the folder and click Delete Folder.

  4. On the File menu, click Save Changes to commit this deletion to the database.

  5. Note the appearance of Errors (n) (where n is the number of errors) on the lower-right corner of the status bar. Double-click it to open the Errors workpad.

  6. In the Errors workpad, note that the commit operation failed because the delete statement conflicted with a reference.

    Note

    You cannot delete a folder that references data in other folders by using a foreign key (for example, an attempt to delete the People folder will fail.) If you attempt to do so, an error will occur when you try to commit the change. The error details can be viewed by double-clicking Errors (n) at the lower-right corner of the screen. For more information, see How to: Update and Delete a Folder.

  7. Double-click Change (n) on the lower-right corner of the status bar to open the change list. Right-click People on the left pane and select Revert Delete. Note that the errors disappear from the Errors workpad and the pending delete disappears from the change list. For more information about reverting changes, see Committing Changes and Resolving Conflicts.

See Also

Concepts

Committing Changes and Resolving Conflicts