If you are using DB2, you can run query specifications either dynamically or statically. If you use dynamic queries, each SQL statement is prepared at runtime. With static queries, the SQL statements are precompiled before runtime so the prepare is not necessary. If you have many different queries, using static SQL support helps your application run much faster. If you only have a few queries that are executed repeatedly, you may not notice much of a difference.
To create static queries, do the following:
For the sample application, select SampleDatabaseAccessSet.
For the sample application select SampleConSpec.
For the sample application, type SampleDatabaseStaticPackage.
Note: | When you apply the settings for an updatable part, VisualAge automatically generates queries that are required for runtime, stores them in the access set, and adds them to the package. If you add queries to a package specification manually, the automatically generated queries will not be included in the package. If you are using VisualAge parts, you should let the Multi-row Query settings manage the package for you. |
It is a good idea to finish your application and test it before precompiling packages. After you finish the sample application and test it, precompile the package spec and try testing again.