Previous Topic

Next Topic

Integration with Visual Studio 2005

The Ingres .NET Data Provider is integrated with Visual Studio 2005.

The .NET Framework has design-time support. .NET objects, derived from certain component objects, can exist within an application runtime environment and in a designer environment such as Microsoft's Visual Studio 2005.

Integration with Visual Studio 2005 visual tools allows a programmer to drag-and-drop the data provider design component onto a control. Integration also allows the programmer to use wizards and editors to aid application development.

The Visual Studio 2005 Toolbox contains a series of tabs (for example, Data, Components, and Window Forms) that list objects for the Visual Studio 2005 design environment. These objects can be dragged-and-dropped onto design surfaces such as the Windows Form control (WinForm). This operation can trigger wizards, designers, or simply a paint of a control on the design surface.

Previous Topic

Next Topic

Install the Data Provider into the Toolbox

The Ingres .NET Data Provider must be installed into the Visual Studio 2005 Toolbox before using it for the first time.

To install the data provider components into the Toolbox

  1. Create an empty Winform application.
  2. Right-click the Data tab of the toolbox, and select Customize Toolbox.

    The Customize Toolbox dialog is displayed.

  3. Select the IngresCommand, IngresConnection, and IngresDataAdapter components on the .NET Framework Components tab, and then click OK.

    The Ingres .NET Data Provider components are installed in the Toolbox, as shown in this example:

    Data Provider Customize Toolbar

If the IngresCommand, IngresConnection, and IngresDataAdaper components do not appear in the Customize Toolbox dialog, you can add them.

To add the Ingres .NET Data Provider components to the Customize Toolbox dialog

  1. Click Browse on the Customize Toolbox dialog and browse to the directory C:\Program Files\Ingres\dotnet\assembly\v2.0.
  2. Open the Ingres.Client dll.

    The components are added.

Previous Topic

Next Topic

Start the Ingres Data Adapter Configuration Wizard

The Toolbox's Data tab lists the .NET data provider components that are available during the application's design.

To start the Ingres Data Adapter Configuration Wizard

  1. Drag the IngresDataAdapter component from the list on the Toolbox's Data tab onto the Windows Form design surface ("Form1").

    The welcome page of the Data Adapter Configuration Wizard is displayed.

    Data Adapter Config Wizard Welcome

    An "ingresDataAdapter1" component and its icon are added to the Visual Studio 2005 designer component tray.

  2. Click Cancel on the welcome page.

    Only the IngresDataAdapter component is created.

Previous Topic

Next Topic

Configure a Connection

Ingres Data Adapter Configuration Wizard assists you in specifying the design properties of the ingresDataAdapter1 component, including its connection string definition.

A connection string is a collection of information that identifies the target server machine and database to connect to, the permissions of the user who is connecting, and the parameters that define connection pooling and security. You must configure a connection string before connecting to a database using a .NET application.

To configure a connection string

  1. Click Next in the Data Adapter Configuration Wizard welcome screen.

    The Connection String Editor dialog is displayed.

    Connection String Editor Dialog

  2. Enter the required information. For details, see Connection String Editor.

    Click OK.

    The Connection string is created.

Previous Topic

Next Topic

Connection String Editor (Data Adapter Configuration Wizard)

The Connection String Editor of the Ingres Data Adapter Configuration Wizard has the following tabs:

Connection Tab

Advanced Tab

Previous Topic

Next Topic

Design a Query Using the Query Builder

The Ingres .NET Data Provider uses SQL statements to retrieve and update data in Ingres databases. In the Data Adapter Configuration Wizard, you can enter your SQL command or use the Query Builder tool to generate the SELECT statement.

To design a query using the Query Builder

  1. Click Query Builder to develop your SELECT statement.

    The Add Table dialog opens.

  2. Click User Tables or All Tables.

    A list of available tables is displayed.

  3. Choose your table from the list, and then click Add, Close.

    Ingres Query Designer opens.

    The Ingres Query Designer has three horizontal panels:

  4. Enter column references you want to add to your query into any one of the three panels.

    The other two panels are automatically updated.

  5. Click OK.

    The query builder returns to the Ingres Data Adapter Wizard and displays the generated SELECT statement.

  6. Click Finish.

    The Ingres Data Adapter Wizard is closed.

Previous Topic

Next Topic

Server Explorer Integration

The Ingres .NET Data Provider is integrated with the Visual Studio Server Explorer and Data Sources tabs.

A Data Connection definition for Ingres can be defined in the Server Explorer. This Data Connection definition can subsequently be used by other wizards and designers in Visual Studio.

Data Connection Definition

The Data Connection definition can also be used to examine the metadata information of tables and views in the Ingres connection.

Server Explorer

Note: The Visual Studio integration does not currently support database procedures.


© 2007 Ingres Corporation. All rights reserved.