Retrieving Results
Some SQL statements, like SELECT, can return a table of results that must be retrieved by the program. The IBM manuals refer to these as result tables. Stored procedures invoked by the SQL CALL statement may return multiple result tables, and each is referred to as a result set. In this chapter we'll use the term result set to refer to either a result table from a query or a result set from a stored procedure, because the way they are handled in application programs is indistinguishable.
In DB2 ODBC, as in embedded SQL, result sets are retrieved using cursors. Similar to SQLBindParameter() for parameter markers in the SQL statement, result set columns are associated with application variables. The SQLBindCol() function handles ...
Get DB2® Universal Database™ for OS/390™ v7.1 Application 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.