Chapter 10. Using SQL in an Application Program
• Table and view definitions
• Host variables and structures
• SQL execution validation
• Cursors
• Dynamic SQL
Suppose that you are writing an application program to access data in a DB2 database. When it executes an SQL statement, your program needs to communicate with DB2. When DB2 finishes processing an SQL statement, DB2 sends back a return code, which your program should test to examine the results of the operation.
To communicate with DB2, you need to choose one of these methods:
• Static SQL
• Dynamic SQL
• Open Database Connectivity (ODBC)
• Java Database Connectivity (JDBC) application support
Static and dynamic SQL statements can be embedded in application source programs. During the ...
Get DB2® for z/OS® Version 8 DBA Certification Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.