IBM Books

Embedded SQL Programming Guide


Building the Stored Procedure Application

Stored procedure applications have special compile and link requirements. The client procedure must be part of an executable file, while the stored procedure must be placed in a library on the database server.

When testing these applications, it is helpful to execute both procedures locally on the same machine. (This machine must be configured as a client/server.) After the application executes locally without error, move the stored procedure to a database server, or move the client procedure to a database client for further testing.

Client Application

The precompile, compile, and link requirements of the client application are identical to those of a normal database manager application.

Refer to the DB2 SDK Building Applications book for your environment for details on how to build and execute a client application in the programming language you wish to use.

Stored Procedure

The stored procedure must be precompiled, compiled, and linked to produce a library. Special compile options are required, and the application must be bound to the database on the server before it can be run. Remember also that for all these steps, the procedure must use the same code page as the database.

Refer to the DB2 SDK Building Applications book for your server environment for details on how to prepare your server procedure.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]