Rapid Windows application development with IBM Informix Dynamic Server and IBM Database Add-ins for Visual Studio 2005

Expanded capabilities for Informix .NET programming

IBM® introduced the IBM Database Add-ins for Visual Studio 2005 to allow rapid Windows® application development, database schema development, and debugging, along with numerous other features. This IBM tooling has been available for DB2 on all of the Visual Studio 2005 editions or Visual Studio 2005 team editions. Now, support for Informix® Dynamic Server (IDS) is added to this product, allowing IDS application developers to use some of the basic and important Visual Studio functionalities. In this article, you'll be introduced to the functionalities provided by IBM Database Add-ins for Visual Studio 2005 for Informix.

Vimal Pradeep (vimalpradeep@in.ibm.com ), Systems Software Engineer, Informix CSDK Team, India Software Lab , IBM

Vimal Pradeep photoVimal P Pradeep is a Systems Software Engineer working at IBM India Software Lab, with experience in various Informix client components namely ODBC, ESQL/C, LIBC++ and .NET provider.



Malarvizhi Kaliyakrishnan (malarvizhi@in.ibm.com ), Systems Software Engineer, Informix CSDK Team, India Software Lab , IBM

Malarvizhi Kaliyakrishnan photoMalarvizhi Kaliyakrishnan is a Systems Software Engineer working at IBM India Software Lab, with experience in .NET application development and Informix client components namely .NET and ODBC.



03 May 2007

Introduction

Recently, support for IDS was added to the IBM Database Add-ins for Visual Studio 2005, enabling IDS application developers to use many of the Visual Studio 2005 functionalities. This support enables IDS application developers to reduce development time and develop .NET applications for a wide range of IDS server families using Microsoft® Visual Studio 2005 as their integrated development environment.

Toolbox support with Visual Studio 2003 has been deprecated for use with Visual Studio 2005. IBM Database Add-ins for Visual Studio 2005 is shipped with Informix CSDK, beginning with CSDK 300TC1. The same tooling is also shipped with DB2® clients. The Add-ins versions shipped with Informix CSDK and DB2 are mutually compatible. This article provides an overview of the functionality provided by IBM Database Add-ins for Visual Studio 2005 for Informix.

Please see the Resources section of this article to download the Informix CSDK/IBM Database Add-ins for Visual Studio 2005.

Note: Version 9.x and later server families are supported by this add-in product. Please note that SE engines, 8.x (XPS), 7.x, and 5.x server families are not supported.

IBM Database Add-ins for Visual Studio 2005 highlights

Here are some highlights of the new add-ins:

  • Integrated installation: IBM Database Add-ins for Visual Studio 2005 installation is integrated with CSDK 300TC1 installation.
  • Server Explorer: There is seamless integration with Microsoft Server Explorer, so that Informix connections can now be added into Microsoft Server Explorer. The IBM Informix .NET provider for .NET framework 2.0 is used for this seamless integration.
  • Windows application development: You can build Windows applications for Informix without writing any code through Informix .NET provider for .NET framework 2.0 for 9.x and later IDS families.

Installation

The IBM Database Add-ins for Visual Studio 2005 product is integrated with the IBM Informix CSDK product, which also provides you with an option to install the tooling. The last step of the CSDK installation wizard presents a check box provision for this.

Figure 1. Installation screen
Installation screen

Although the installation is integrated with CSDK, IBM Database Add-ins for Visual Studio 2005 appears as a separate product in the Add/Remove Programs utility of the Windows Control Panel.

Figure 2. Installed programs
Installed Programs

The installer invokes macconfigchange.exe, which is bundled with the product, and updates the machine.config file by adding entries needed for the Visual Studio Add-ins product. The installer also updates registry entries by calling commontoolreg.exe, which registers the Informix Add-ins package for Visual Studio 2005. Please note that it registers Visual Studio Add-ins for Informix only if it detects .NET framework 2.0 and Informix .NET provider installed on the machine. Once the installation is complete, you can confirm the installation of the Visual Studio add-ins opening Visual Studio 2005 IDE and clicking Help > About Microsoft Visual Studio.

Figure 3. Confirmation of successful installation
Confirmation of successful Installation

Confirmation of successful Installation

Adding connections using Visual Studio add-ins

Informix connections can be added using the Add Connection option from Server Explorer. Follow these simple steps to set up an IDS connection:

  1. If Server Explorer is not already open, click View > Server Explorer.
    Figure 4. Server Explorer
    Server Explorer
  2. From the Data Connections node, right-click and select Add Connection.
    Figure 5. Add Connection
    Add Connection
  3. Select Data Source, and select IBM Informix. (You can check the box for Always use this selection, to avoid this step every time an Informix connection is added.) Click OK.
    Figure 6. Select Data Source
    Select Data Source
  4. Add the server name, database name, user ID, and password. (You can select Save password to persist the password across Visual Studio 2005 sessions. You can also opt to Test Connection.) Click OK. A connection to your database will be added in Server Explorer.
    Figure 7. Add Connection dialog box
    Add Connection Dialog Box
  5. Several features are available in the Server Explorer Add connection integration that are unique to IBM tools and not available for other databases in Server Explorer:
    Figure 8. Features
    FeaturesServer Explorer Add connection integration includes these features:
    • It has the ability to automatically refresh a connection when the Visual Studio instance is re-opened. You can make that selection on the Add Connection or Modify Connection dialog.
    • Filtering for schema and folders is now simplified to use a LIKE search. Filters for schema apply to all folders. In addition, folder level filters are now supported in the Add Connection or Modify Connection dialogs. Filter values are case sensitive. For example, adding a schema filter value of "IBM" will retrieve all objects starting with schema "IBM" and not "ibm".
    • By default, system database objects are not enumerated and will not be listed in Server Explorer; but you can defer this by unchecking the option for "Exclude system schema" in the Add Connection window.
    • Application developers may not always be interested in all the default database objects, such as tables, views, procedures, and functions, but rather just a few of them. Add Connection and Modify Connection dialogs allow you to select the folders that interest you. Only the selected folders participate in the pre-fetch operation and schema caching. This selection provides an improved development experience if the developer is using that connection. Please note that since web services are not supported in this release, the Web Services folder is disabled by default.

Server Explorer integration

After adding a new connection, all schema information is asynchronously pre-fetched and cached. This allows rapid access to this information when designing applications. These fetched server objects are listed as folders under the corresponding connection.

Table Enumeration: Expanding the Tables folder will list the tables available in the database, depending upon whether the Filter option or Exclude system schema option is supplied in the Add Connection window. By expanding a particular table, you can see the list of columns with which the table was built.

Figure 9. Table Enumeration
Table Enumeration

The Property window lists the important properties of the database object selected in the Server Explorer. For example, if you've selected the column "fname" of table "customer" of the stores_demo database, the corresponding Property window would appear:

Figure 10. Properties window
Properties Window

View Enumeration: This is similar to Table enumeration.

Figure 11. View Enumeration
View Enumeration
Figure 11. View Enumeration (continued)
View Enumeration

Procedure / Function Enumeration: You can view a list of stored procedures and functions by clicking the Procedures and Functions folders respectively. Expanding each stored procedure or function will list the parameters involved. To view the properties of parameters, right-click on the parameter and select Properties. Running stored procedures is currently not supported.

Figure 12. Procedure Enumeration
Procedure Enumeration
Figure 12. Procedure Enumeration (continued)
Procedure Enumeration
Figure 13. Function Enumeration
Function Enumeration
Figure 13. Function Enumeration (continued)
Function Enumeration

Windows application development

Applications can be seamlessly developed for Informix using the new paradigm introduced in Visual Studio 2005 for building Windows applications. Simply follow this procedure to build a Windows application:

  1. Add a connection to an Informix database.
  2. Create a new Windows application using the File > New > Project menu. Call it "customerApp". In this article, let's create a C# application.
    Figure 14. Creating a new C# Windows application
    Creating a new C# Windows Application
  3. Create a data source for the customer table.
    1. Using the top-level menu, choose Data > Add New Data Source to invoke the wizard.
      Figure 15. Add New Data Source wizard
      Add New Data Source Wizard
    2. In the wizard, keep the default selection for "Database". Click Next.
    3. From the list of connections, select the connection to sample what was created earlier. Select the option to include sensitive data in the connection string. Click Next.
      Figure 16. Select Database
      Select Database
    4. Optionally check the box to save the connection string as "stores_demoConnectionString". Click Next.
    5. Select the Customer table from the list of tables, and click Finish.
      Figure 17. Select Table
      Select Table
    6. A data source for the Customer table will be added in the Data Sources window. You can make the Data Sources window visible using the top-level menu, and selecting Data > Show Data Sources.
      Figure 18. Customer DataSource Added
      Customer DataSource Added
  4. Design the Windows application.
    1. Ensure the Form1.cs is open in design mode.
      Figure 19. Form in design mode
      Form in design mode
    2. Drag and drop the department data source from the Data Sources window onto the form. Notice the default-generated user interface.
      Figure 20. Designed Windows form
      Designed Windows Form
  5. Run the Windows application.
    Figure 21. Running customerApp
    Running CustomerApp
    You can use the pre-created user interface to navigate the rows. You can also add new rows, delete and update existing rows. Clicking the Save button will save the changes to the server.

Windows application development through DataSet creation

  1. Using the Microsoft Solution Explorer, right-click on the customerApp, and select Add > New Item.
    Figure 22. Add New Item
    Add New Item
  2. Select DataSet. Click Add. The Microsoft DataSet designer will open.
    Figure 23. Add New DataSet
    Add New DataSet
  3. From the Microsoft Server Explorer, drag and drop another table, named "orders", onto the open designer. This creates the data source for "orders".
  4. You can drag and drop the newly created data source onto a fresh form, as mentioned in Steps 4 and 5 of the Windows application development section, by running the form, insert/update/delete operations can be done in the table "orders".

Documentation

The documentation help for IBM Database Add-Ins for Visual Studio 2005 is integrated into IDE. You can see this in the steps below:

Step 1: Click Help > Contents.

Figure 24. Help
Help

Step 2: Click IBM Database Documentation > IBM Database Add-Ins Help. This documentation contains help for both DB2 and Informix, whereas DB2 specific help pages are marked with db2 .

Figure 25. Contents
Contents

Features proposed for future releases

Here are some areas of interest you may wish to explore in future releases of the IBM Informix Visual Studio Add-Ins:

  • Support for Web applications
  • DDL support
  • Script designer
  • Show data support with XML import/export

Conclusion

IBM Informix provides new support in the Visual Studio 2005 tooling. The new features include seamless integration with Microsoft Server Explorer and rapid Windows application development for Informix servers that use Informix .NET 2.0 Provider, thereby taking your .NET application developing experience to the next level.

Acknowledgements

This release of Visual Studio 2005 Add-ins was developed by IBM teams in the Lenexa Lab and the India Software Lab.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Information management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=217029
ArticleTitle=Rapid Windows application development with IBM Informix Dynamic Server and IBM Database Add-ins for Visual Studio 2005
publish-date=05032007