View Nodes
This section covers the following topics:
How the View Nodes Work
The View node is a child of the Views node. It represents one or more views associated with this table (or set of tables), and can represent any of the following view types:
-
Relational: Its child nodes are:
-
View Column nodes, which represent each column in the view
-
Triggers node, which represents triggers on this view
-
-
XML: Its child nodes are:
-
Triggers node, which represents triggers on this view
-
Object Views node
-
-
Object: Its child nodes are:
-
Triggers node, which represents triggers on this view
-
Note: The View nodes do not include index-organized or materialized views.
Starting with Visual Studio 2005, you can edit the name of the view in place by selecting the name and then clicking it to open an edit box or by choosing the Rename menu option to open the edit box.
Note: This feature only works in Visual Studio 2005.
To perform actions on the View nodes, right-click this node and from the menu choose the appropriate command. To view the node's properties, select the node and/or click Properties in the node's menu. To view the view's data, double-click the View node.
Drag and Drop Support
This node can be dragged and dropped into DataSet Designers and XML Schema Designers.
Please see the following Microsoft documentation:
-
DataSet Designer
http://msdn2.microsoft.com/en-us/library/314t4see(VS.80).aspx
-
XML Schema Designer
http://msdn2.microsoft.com/en-us/library/ms171943(vs.80).aspx
You can automatically generate a query for a view by dragging the view node onto the Oracle Query Window. Dragging a view node onto the Oracle Query Window generates a query that selects the column from the corresponding view.
Also, you can automatically generate a query for a view by dragging the view node onto the Microsoft Query Designer. This generates a query that selects the column from the corresponding view.
Menu Options
Menu Option | Description |
---|---|
Design |
Opens the view in the View Designer. If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and the Designer will not open. This command is not supported for object views. |
Retrieve Data |
Opens the view in the Data Window. If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and no data window will open. This command is not supported for object views. |
Add Trigger |
Adds a new trigger to the view using the Table Designer. If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and the Create Trigger dialog box will not open. This command is not supported for object views. |
Query Window |
Opens the Query Window so that you can execute SQL and PL/SQL queries from Visual Studio. |
Generate Create Script |
Writes the table definition to a If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and the script will not be generated. This command is not supported for object views. |
Generate Create Script to Project |
Generates the table definition to a . If multiple objects in Server Explorer are selected, a master SQL script is created in the Oracle Database Project Scripts folder. This master script contains calls to individual child SQL scripts (one for each schema object) generated into the various schema object folders and this master script is ordered with dependencies taken into consideration. If there are multiple open Oracle Database projects, Visual Studio prompts you to select the project to add the script to. This operation can also be performed by dragging and dropping the Server Explorer node(s) directly onto a database project folder. See Managing Oracle Script Files for more information. Note: Oracle Database Project Version 2 projects are not supported. To add scripts to this project type, use Import Schema or Add Existing Item menu items on an Oracle Database Project Version 2 project folder, or use the Schema Compare tool. |
Dependencies and References |
Opens the Dependencies and References Viewer for viewing the dependencies that this object has on other database schema objects. |
Privileges |
Opens the Grant/Revoke Privileges dialog box. |
Generate Code |
Generates example code that executes a SELECT against this view. From the submenu, select C#, Java, Python or Javascript. A new code window will open with the example code in the language selected. Generating code additional times for the same language type will place the additional code in the already open code window at the point of the cursor. If you do not want that, then close the open code window before regenerating code. |
Copy |
Copies the selected view to the clipboard for pasting into Visual Studio designers. This provides the same functionality as dragging and dropping the view to the Visual Studio designers. |
Delete |
Drops the view. If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and the node is deleted. If the table cannot be dropped due to dependencies, a dialog box appears with two options. Click Yes to delete the table regardless of dependencies. Click No to skip the table deletion. |
Rename |
Allows you to edit the View name in place in Server Explorer. Alternatively, you can select the View name and then click one more time to open an edit box. |
Refresh |
Updates the View node. If the database object associated with the node was deleted from the database, you will be asked if the node needs to be deleted from the Server Explorer. |
Properties |
Displays the Properties window. |
See Also
Tables Node | Table Column Node | Table Designer | Oracle Data Window | XML Schema Designer