Compartir a través de


How to: Update and Delete a Folder

[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 describes how to update and delete a Folder in Microsoft code name “Quadrant”. The following instructions use sample that is installed in How to: Install the "Quadrant" Sample Data.

To update a folder

  1. Double-click the Organization folder to open it in a new workpad.

  2. Expand the Organization node in the new workpad and double-click the FoldersTable node to open it in a new workpad.

  3. In the upper-right corner of the new FoldersTable workpad, click the viewer switch icon (the triangle) and select Table. This will display the unique identifier of all folders under Organization and their respective names.

  4. For the Tasks row (with an Id of 106), change the Name field to My Tasks. Note that the name changes in the Repository Explorer and in the Folders workpad. Also note the asterisk (*)to the left of the Folder name, which indicates a pending change.

  5. On the File menu, click Save Changes to commit the change. Note that the asterisk disappears.

  6. Return to the Explorer. Expand the Database node.

  7. Expand the Microsoft.Samples.Organization node.

  8. Double-click the Events node in the explorer. The new workpad titled Events shows all records of the Events table.

  9. Double-click the Planning Meeting I event. A new workpad titled 3 (the Id of the event) appears in a property viewer.

  10. Click the drop-down arrow in the Folder field and choose My Tasks to move the Planning Meeting I event to the My Tasks folder.

  11. On the File menu, click Save Changes to commit this change to the database.

  12. To view the event in its new Folder location, return to the Explorer. Expand the Organization folder and double-click the My Tasks folder under Organization. In the new workpad, expand the My Tasks node. Note the Events node that contains the newly added event record.

  13. Similarly, double-click the Events folder under Organization. In the new workpad, expand the Events node and double-click its Events subnode. Note that Planning Meeting I is not in this folder anymore.

To delete a folder

  1. Click the Events folder under Organization.

  2. On the Data menu, click Delete Item. Alternatively, you can click the X on the right of the folder name, or right-click the folder and click Delete Folder. Note the hyphen (-), which indicates a pending deletion.

  3. On the File menu, click Save Changes to commit this change to the database. The change is saved successfully and the Events folder disappears from the Explorer.

  4. Click the People folder under Organization.

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

  6. On the File menu, click Save Changes to commit this change to the database.

  7. Note that Errors (n) appears at the lower-right corner of the screen. Double-click it, or on the View menu, click Errors, and then click Repository to view errors that would result when you commit the change. The deletion fails when “Quadrant” reaches the first Person record that has a reference, and SQL Server will stop the commit operation on this first error. The n in Errors (n) simply means that there might be more than one record that has a foreign key reference.

  8. On the File menu, click Revert All Changes to revert this deletion. Note that the errors are gone from the Errors workpad.

Note

You cannot delete a record that references data in other tables by using a foreign key. If the foreign key constraints are resolved, a record can be deleted.

See Also

Other Resources

Exploring and Organizing Data in "Quadrant"