Programmer's Guide to the Pro*Ada Precompiler
Library
Product
Programmer's Guide to the Pro*Ada
®
Precompiler
Preface
Audience
How The
Programmer's Guide to the Pro*Ada Precompiler
Is Organized
Introduction
The Pro*Ada Precompiler
Advantages of Ada
The SQL Language
Pro*Ada Features
Special Terms
An Overview of Embedded SQL
Embedded SQL
The Pro*Ada Development Process
A Pro*Ada Demo Program
Developing a Pro*Ada Program
Datatypes
Declaring and Referencing Host Variables
Declaring and Referencing Indicator Variables
Handling Character Data
Derived Types as Host Variables
The SQL_STANDARD Package
Library Units
File Length
Tasking
Cursor Variables
Connecting to Oracle
Concurrent Logons
Using Embedded SQL And PL/SQL
Using Host Variables
Using Indicator Variables
Basic SQL Statements
Sequence of Cursor Statements
A Complete Example
Advantages of PL/SQL
Embedding PL/SQL Blocks
Using Host Variables with PL/SQL
Using Host Arrays with PL/SQL
Calling Stored Subprograms
Handling Runtime Errors
The Need for Error Handling
Error Handling Alternatives
Key Components of Error Reporting
SQLSTATE Status Variable
Using the SQL Communications Area (SQLCA)
Declaring SQLCODE
Using the WHENEVER Statement
Using Indicator Variables
Example Program
Defining and Controlling Transactions
Terms You Should Know
How Transactions Guard Your Database
How to Begin and End Transactions
Using the COMMIT Statement
Using the SAVEPOINT Statement
Using the ROLLBACK Statement
Using the RELEASE Parameter
Using the SET TRANSACTION Statement
Overriding Default Locking
Fetching Across COMMITs
Handling Distributed Transactions
Guidelines for Creating Applications
Using Host Arrays
Host Arrays
Declaring Host Arrays
Using Arrays in SQL Statements
Selecting into Arrays
Inserting with Arrays
Updating with Arrays
Deleting with Arrays
Using Indicator Arrays
Using the FOR Clause
Using the WHERE Clause
Mimicking CURRENT OF
Using the SQLROWS Function
An Array Bind Example
Introduction to Dynamic SQL
Dynamic SQL
Advantages and Disadvantages of Dynamic SQL
Requirements for Dynamic SQL Statements
How Dynamic SQL Statements Are Processed
Methods for Using Dynamic SQL
Using Method 1
Using Method 2
Using Method 3
Using PL/SQL
Implementing Dynamic SQL Method 4
Dynamic SQL with Descriptors
Basic Steps
A Closer Look at Each Step
A Method 4 Program
A Describe Program
SQL* Forms User Exits
User Exits
Developing a User Exit
Writing a User Exit
Passing Values Between User Exits and SQL*Forms
An Example
Using the GENXTB Utility
Linking a User Exit into SQL*Forms
Calling a User Exit from a Trigger
Passing Parameters to a User Exit
Guidelines for User Exits
EXEC TOOLS Statements
Running the Pro*Ada Precompiler
Issuing the Precompiler Command
Scope of Options
Entering Options
Using the Precompiler Options
Obsolete Options
Conditional Precompilations
Separate Precompilations
Compiling and Linking
New Features
Quick Reference to Embedded SQL
How to Read Syntax Diagrams
CLOSE
COMMIT
CONNECT
DECLARE CURSOR
DECLARE DATABASE
DECLARE STATEMENT
DECLARE TABLE
DELETE
DESCRIBE
ENABLE THREADS
EXECUTE
EXECUTE IMMEDIATE
EXECUTE plsql_block
FETCH
FOR
INSERT
OPEN
PREPARE
ROLLBACK
SAVEPOINT
SELECT
UPDATE
VAR
WHENEVER
WHERE
Oracle Reserved Words, Keywords, and Namespaces
Oracle Reserved Words
Oracle Keywords
PL/SQL Reserved Words
Oracle Reserved Namespaces
Performance Tuning
Causes of Poor Performance
Improving Performance
Using Host Arrays
Using Embedded PL/SQL
Optimizing SQL Statements
Using Indexes
Taking Advantage of Row-level Locking
Eliminating Unnecessary Parsing
Syntactic Checking
Rules of Syntax
Controlling the Type and Extent of Checking
Specifying SQLCHECK=SYNTAX
Specifying SQLCHECK=NONE
Operating System-Specific Information
Copyright © 1996 Oracle Corporation
500 Oracle Parkway, Redwood City, CA 94065
Library
Product