After you capture the SQL statements in your .NET application, you bind the statements that use a given database to a version of the database that is associated with a specific data connection. You must bind each of the captured SQL (.capt) files in a separate bind process.
Note: If you are using IBM® Data Server Driver Package instead of IBM Data Server Client or IBM Data Server Runtime Client, you cannot bind your SQL statements in the add-ins. You must bind the packages on your remote database.
Prerequisites:
To bind captured SQL statements in a package:
The Captured SQL Bind Options window opens.
Tip: For the PKLIST option, select the collection ID check boxes in the order that you want the collections to occur in the package list. This order can affect the runtime performance of your application program.
The value of the TEXT
field in the
BINDOPTIONS section of the captured SQL file
is updated with the string of bind options that you set.
The package that contains the static SQL must be bound to the database that the application uses.
The DB2 db2cap utility is called and the open captured SQL file and corresponding connection information is passed to the utility.
The captured SQL is bound to the database that is associated with the connection that is selected in the Captured SQL Files viewer, and the package is created. Confirmation of the successful bind operation and package creation is shown in the IBM Output Message Pane.
Improving Performance and Security in .NET Applications with Static SQL | Using Static SQL in .NET Applications | Reviewing Captured SQL Statements | Running .NET Applications with Static SQL