Dynamic Embedded SQL

This section examines how to dynamically prepare SQL statements in a program module. Coding embedded dynamic SQL statements can be complex because a special data structure, known as an SQLDA, must be used to interpret the SQL statement.

If, in the development phase of an application, every SQL statement is known, then static embedded SQL statements could be used for the entire application. When a fully defined SQL statement is embedded in an application, it is said to be statically prepared. The meaning behind static preparation will become clear when we discuss how to precompile and bind applications in the latter part of this chapter. For now, just note that during the static preparation phase, the QEP of the SQL statement ...

Get DB2® Universal Database™ v8 Application Development Certification Guide, 2nd Edition 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.