home *** CD-ROM | disk | FTP | other *** search
- /*---------------------------------------------------------------------------
- *
- * Copyright (c) 1994 by Westmount Technology B.V., Delft, The Netherlands.
- *
- * This software is furnished under a license and may be used only in
- * accordance with the terms of such license and with the inclusion of
- * the above copyright notice. This software or any other copies thereof
- * may not be provided or otherwise made available to any other person.
- * No title to and ownership of the software is hereby transferred.
- *
- * The information in this software is subject to change without notice
- * and should not be construed as a commitment by Westmount Technology B.V.
- *
- *---------------------------------------------------------------------------
- *
- * File : @(#)SqlPrint.ec /main/hindenburg/1
- * Original date : Mon Feb 21 14:51:12 MET 1994
- * Description : General error handling function
- * taken from examples in INFORMIX ESQL/C manual
- *
- *---------------------------------------------------------------------------
- */
- static const char SccsId[]="@(#)SqlPrint.ec /main/hindenburg/1 27 Mar 1997 Copyright 1994 Westmount Technology";
-
- #ifndef SQLPRINT_HXX
- #include "SqlPrint.hxx"
- #endif
-
- #ifndef INFORMIX_HXX
- #include "Informix.hxx"
- #endif
-
- #include <iostream.h>
-
- void sqlprint()
- {
- char errmsg[400];
-
- int msg_num = rgetmsg((short)sqlca.sqlcode, errmsg, (short)sizeof(errmsg));
- if (msg_num == 0)
- cerr << errmsg ;
- else
- cerr << "(Unknown error message)" << endl;
-
- if(sqlca.sqlerrd[1] != 0) {
- cerr << "The ISAM code is " << sqlca.sqlerrd[1] << endl;
- rgetmsg((short)sqlca.sqlerrd[1], errmsg, sizeof(errmsg));
- cerr << "The ISAM message is: " << errmsg << endl;
- }
- }
-
-