Home | Previous Page | Next Page  

Programming with SQL

In This Chapter
SQL in Programs
SQL in SQL APIs
SQL in Application Languages
Static Embedding
Dynamic Statements
Program Variables and Host Variables
Calling the Database Server
SQL Communications Area
SQLCODE Field
End of Data
Negative Codes
SQLERRD Array
SQLWARN Array
SQLERRM Character String
SQLSTATE Value
Retrieving Single Rows
Data Type Conversion
Working with NULL Data
Dealing with Errors
End of Data
End of Data with Databases That Are Not ANSI Compliant
Serious Errors
Interpreting End of Data with Aggregate Functions
Using Default Values
Retrieving Multiple Rows
Declaring a Cursor
Opening a Cursor
Fetching Rows
Detecting End of Data
Locating the INTO Clause
Cursor Input Modes
Active Set of a Cursor
Creating the Active Set
Active Set for a Sequential Cursor
Active Set for a SCROLL Cursor
Active Set and Concurrency
Using a Cursor: A Parts Explosion
Dynamic SQL
Preparing a Statement
Executing Prepared SQL
Dynamic Host Variables
Freeing Prepared Statements
Quick Execution
Embedding Data-Definition Statements
Granting and Revoking Privileges in Applications
Assigning Roles
Summary
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]