GNADE User's Guide

GNADE, The GNat Ada Database Environment

Version 1.2.0

Document Revision $Revision: 1.26 $

Michael Erdmann

Jürgen Pfeifer

Edited by

Michael Erdmann

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being "The GNat Ada Database Environment". A copy of the license is included in the section entitled "GNU Free Documentation License".


Table of Contents
Preface
I. Introduction
1. Project Objectives
2. Software License
3. Trademarks
4. Supported Databases and OS platforms
5. Getting started
Installation on Unix like systems
Installation on Windows NT
6. Using the release with your database
If your data base is not supported
Installation of the ODBC Interface
Prepared Example Programs
7. Contents of the GNADE distribution
8. Contact
9. Authors
II. GNU Embedded SQL Translator for Ada 95
10. Introduction to Embedded SQL
11. Embedded SQL Syntax Specification
The GNU Ada 95 Embedded SQL
Embedded SQL statement
SQL Query and FETCH clause
Embedded SQL declare section
Embedded Exception Declaration
Handling of return codes
SQL Communication Area
Connection Handling
Cursor Handling
Mixing ODBC and embedded SQLcode
Dynamic SQL
GNADE Specific Datatypes
12. The ESQL Translator
Compilation Process
Invocation of the GNU ESQL Translator (gesql)
III. ODBC bindings for Ada 95
13. Introduction to ODBC
14. Using the Ada 95 ODBC Bindings
General remarks
A minimal odbc example
Implemented ODBC methods
15. Building ODBC based programs
16. Ada95 aspects of the ODBC binding
IV. Native Bindings
17. Introduction to native bindings
18. MySQL bindings
The MYSQL API
Building programs with MySQL
19. Postgres bindings
A. Frequently asked questions
Q: How to handle strings in where clauses
Q: How to handle connection failures
B. The GNU.DB Packages
GNU.DB.ESQL_Support
String related type conversion
SQL Communication Area
Exceptions
ODBC related packages
C. Porting legacy code
Migrating from Oracle to GNADE
Host variables
Query Results
Others
D. GNU Free Documentation License
0. PREAMBLE
1. APPLICABILITY AND DEFINITIONS
2. VERBATIM COPYING
3. COPYING IN QUANTITY
4. MODIFICATIONS
5. COMBINING DOCUMENTS
6. COLLECTIONS OF DOCUMENTS
7. AGGREGATION WITH INDEPENDENT WORKS
8. TRANSLATION
9. TERMINATION
10. FUTURE REVISIONS OF THIS LICENSE
E. GNU Public License (GPL) Version 2
List of Tables
4-1. Supported Platforms
7-1. Production results of the GNADE Project
11-1. Exception Actions
12-1. Options
List of Examples
6-1. /etc/odbc.ini entry for the test data base
10-1. Example for Embedded SQL
11-1. Embedded SQL Statements
11-2. Local SQLCA in procedures
11-3. Using DB connections as procedure arguments
11-4. Local Cursors
11-5. Accessing ODBC handles
11-6. Using dynamic SQL
11-7. Using VARCHAR
14-1. Preparing data of the ODBC driver
14-2. Connecting to the data base via ODBC
14-3. Preparing the Query via ODBC
14-4. Using host variable with ODBC
14-5. Creating the result set for a query
14-6. Fetching data of the result set via ODBC
18-1. MySQL native binding - Connecting to the database.
18-2. MySQL native binding - Executing a query
18-3. MySQL native binding - Accessing the result set
18-4. MySQL native binding - Dropping the query
A-1. Using a string in the WHERE clause
A-2. Intercpetion connection errors