|GNADE User's Guide: GNADE, The GNat Ada Database Environment; Version 1.5.3; Document Revision $Revision: 1.45 $|
|Prev||Chapter 16. Building Applications using ESQL||Next|
Since the ESQL support package creates some diagnostic printouts it may be interesting to redirect these messages towards any destination. This might be done by overloading the type Connection_Type of the GNU.DB.ESQL_Support.ODBC package and providing implementations of the Error, Warning and Connect procedures.
Example 16-2. Redirecting ESQL diagnostics
package Dynamic_Connect is type My_Connect_Type is new ODBC.Connection_Type with record .... your extensions ..... end record; procedure Error( C : in My_Connect_Type; T : in String ); procedure Warning( C : in My_Connect_Type; T : in String ); function Connect( Source : in String; UserName : in String; Password : in String ) return ODBC.Connection_Handle; end Dynamic_Connect;
The implementation might be found in samples/esql.