IBM Database Add-Ins for Visual Studio

Using Static SQL in .NET Applications  (DB2)

With the IBM® Database Add-Ins for Visual Studio and IBM Optim™ pureQuery Runtime, provide you can use static SQL in your .NET applications.

When you use static SQL, you can improve the stability, security, and manageability of your .NET applications in the following ways:

A .NET application can be any application that you develop in Visual Studio, including Windows, Web, and Web service applications. The application can be written in any .NET-based language, including C#, Visual Basic .NET, J#, and managed C++.

You can use the following data sources for .NET application development with pureQuery:


Prerequisite:  To use static SQL in .NET applications, pureQuery must be enabled for the IBM Database Add-Ins. For information about enabling pureQuery, refer to one of the following information center topics:


To use static SQL in a .NET application:

  1. Open the solution that contains your .NET application in Visual Studio.
  2. Select the data connections for capturing SQL statements.
  3. Capture the SQL statements in your .NET application.
  4. Review the captured SQL statements.
  5. Bind the captured SQL statements for each of the data connections in packages.
  6. Run your .NET application with static SQL.


Note for changing SQL:  If you change any of the SQL in your .NET application, you must repeat the steps, beginning with selecting the data connections. The process of selecting data connections resets the content of the application configuration file so that it contains the necessary information for recapturing the SQL statements.


See Also

Improving Performance and Security in .NET Applications with Static SQL


.NET Development Forum   DB2 FAQs

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