GNADE User's Guide

GNADE, The GNat Ada Database Environment

Version 1.5.3

Document Revision $Revision: 1.45 $

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
6. Building GNADE on different platforms
Installation of the development snapshot on a Unix like systems
Building the development snapshot on Windows NT/XP
7. Using the pre compiled packaged
Installation of RPM files on Linux Systems
Installation on Windows like systems
8. GNADE Addon Packages
OCI - Oracle Call Interface
GSQL - Generic SQL Interface
9. Integration with IDES from other vendors
Using Emacs
Using GPS
10. Using the release with your database
If your data base is not supported
Installation of the ODBC Interface
Prepared Example Programs
11. Contact
12. Authors
II. GNU Embedded SQL Translator for Ada 95
13. Introduction to Embedded SQL
14. 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
15. The ESQL Translator
Compilation Process
Invocation of the GNU ESQL Translator (gesql)
16. Building Applications using ESQL
Using ESQL with make
Additional command Line Interface Options
Redirecting ESQL Support output
III. ODBC bindings for Ada 95
17. Introduction to ODBC
18. Using the Ada 95 ODBC Bindings
General remarks
A minimal odbc example
Implemented ODBC methods
19. Building ODBC based programs
20. Ada95 aspects of the ODBC binding
IV. Native Bindings
21. Introduction to native bindings
22. MySQL bindings
The MYSQL API
Building programs with MySQL
23. Postgres bindings
V. ADBC - Ada Database Connectivity
24. Introduction
25. Basic Concepts
Hostvariables
Statements
Resultset
26. Using the ADO Interface
A Sample Application
Building a Sample Application
Things to know
VI. OCI - Oracle Call Interface
27. Introduction
28. Basic Concepts
Hostvariables
Statements
Resultset
29. Using the OCI packages
A Sample Application
Building a Sample Application
Things to know
VII. GNADE command line tools
30. Introduction
31. lsodbc - Display data source information
32. sql - execute an sql command
33. exp - export a table from a data base
34. imp - import data into a table from export files
VIII. GNADE and the GPS from ACT
35. Introduction
36. GPS Project Files
A. Frequently asked questions
Q: How to setup an application development environment
Q: How can i use GPS with GNADE
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
10-1. Examples of embedded SQL
14-1. Exception Actions
15-1. Options
16-1. Options
31-1. Options
32-1. Options
33-1. Options
34-1. Options
List of Examples
10-1. /etc/odbc.ini entry for the test data base
13-1. Example for Embedded SQL
14-1. Embedded SQL Statements
14-2. Local SQLCA in procedures
14-3. Using DB connections as procedure arguments
14-4. Local Cursors
14-5. Accessing ODBC handles
14-6. Using dynamic SQL
14-7. Using VARCHAR
16-1. A minimal Makefile
16-2. Redirecting ESQL diagnostics
18-1. Preparing data of the ODBC driver
18-2. Connecting to the data base via ODBC
18-3. Preparing the Query via ODBC
18-4. Using host variable with ODBC
18-5. Creating the result set for a query
18-6. Fetching data of the result set via ODBC
22-1. MySQL native binding - Connecting to the database.
22-2. MySQL native binding - Executing a query
22-3. MySQL native binding - Accessing the result set
22-4. MySQL native binding - Dropping the query
A-1. Using a string in the WHERE clause
A-2. Intercpetion connection errors