Advanced Programming Features

Now that we have covered the basic program flow of a CLI application, it is time to look at some more advance features. CLI and DB2 offer many APIs that can be used to finely control your application, such as the ability to scroll forwards and backwards through a result set. You can also retrieve multiple rows of data directly into an array of bound parameters and then turn around and insert or update these values with a single API call. In the next few sections we will take a look at two examples to do this. First we will discuss the different types of cursors that are supported for retrieving data.

Supported Cursor Types

DB2 CLI supports scrollable cursors; the ability to scroll through a cursor.

  • Forward by one ...

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.