IBM Database Add-Ins for Visual Studio  

Creating Views

The IBM® Database Add-Ins for Visual Studio simplify the process of creating database views. You can use one of the following tools to create an IBM database view:

With the designer, you provide information about the view, specify the CREATE VIEW SQL statement, and specify script options for the view. You also can specify triggers and access privileges for the view.

To create a view by using the designer:

  1. In the Server Explorer, right-click Views under your data connection, and then select Add New View with Designer on the shortcut menu.

    The IBM View Designer opens.

  2. Use the designer views to define the SQL condition, triggers, and access privileges for your database view.

    For detailed information about fields in the designer views, see IBM View Designer.

  3. Save the view definition. From the File menu, select Save [view name].

    The view definition script is run against the database and the view is created.

  4. Close the designer.

To create a view by using the editor:

  1. In the Solution Explorer, right-click the Views folder under your IBM database project, select Add, and then select New Item on the shortcut menu.

    The Add New Item window opens.

  2. In the Categories list, select the Views folder.
  3. In the Templates list, select View Script.
  4. In the Name field, type a name for the new view file, then click Add.

    A new view file with a basic structure is created and added to your project.

  5. Use the editor to make changes to the view.
  6. To save your changes, perform one of the following actions:
    • To save the view with its default file name, from the File menu, select Save [file name].
    • To save the view with another name, from the File menu, select Save [file name] As, type a new name for the view file in the Save File As window, and then click Save.

See Also

Developing IBM Database Views | IBM Database Views | Managing Procedures, Functions, and Objects


.NET Development Forum   developerWorks: Visual Studio .NET   DB2 FAQs   IDS FAQs

© Copyright IBM Corporation 2002, 2012. All Rights Reserved.