Informix Sql Error Codes
Contents |
Sep 13 - telecompaper - Shaspa and Tatung have shown a new smart home platform
Finderr
at Ifa in Berlin. Powered by the IBM Informix software... Read 06
Sqlcode
Sep 13 - IBM data magazine - Mission Accomplished - Miami, Florida will be the backdrop for the 2014 fiverr IIUG Informix Conference... Read 01 Feb 13 - IBM Data Magazine - Are your database backups safe? Lester Knutsen (IBM Champion) writes about database back up safety using "archecker"... Read https://www.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.em.doc/errors.html 14 Nov 12 - IBM - IBM's Big Data For Smart Grid Goes Live In Texas... Read 3 Oct 12 - The Financial - IBM and TransWorks Collaborate to Help Louisiana-Pacific Corporation Achieve Supply Chain Efficiency... Read 28 Aug 12 - techCLOUD9 - Splunk kicks up a SaaS Storm... Read 10 Aug 12 - businessCLOUD9 - Is this the other half of http://members.iiug.org/forums/ids/index.cgi/read/19046 Cloud monitoring?... Read 3 Aug 12 - IBM data management - Supercharging the data warehouse while keeping costs down IBM Informix Warehouse Accelerator (IWA) delivers superior performance for in-memory analytics processing... Read 2 Aug 12 - channelbiz - Oninit Group launches Pay Per Pulse cloud-based service... Read 28 May 12 - Bloor - David Norfolk on the recent Informix benchmark "pretty impressive results"... Read 23 May 12 - DBTA - Informix Genero: A Way to Modernize Informix 4GL Applications... Read 9 Apr 12 - Mastering Data Management - Upping the Informix Ante: Advanced Data Tools... Read 22 Mar 12 - developerWorks - Optimizing Informix database access... Read 14 Mar 12 - BernieSpang.com - International Informix User Group set to meet in San Diego... Read 1 Mar 12 - IBM Data Management - IIUG Heads West for 2012 - Get ready for sun and sand in San Diego... Read 1 Mar 12 - IBM Data Management - Running Informix on Solid-State Drives.Speed Up Database Access... Read 26 Feb 12 - BernieSpan.com - Better results, lower cost for a broad set of new IBM
registers. Trapping SQL errors By default, SQL errors stop program execution and display the error message to the standard output. Most SQL statements executed by a program should not return an error and thus do not require error trapping. However, http://www.generomobile.com/techdocs/fjs-fgl-manual/c_fgl_sql_programming_diag.html in some cases, a program must keep the control when an SQL error occurs. For example, when connecting to the database, the user might enter an invalid password that will raise a login denied error. The program must trap such SQL connection error to return to the login dialog and let the user enter a new login and password. To trap potential SQL errors, surround the SQL statements to be checked either with a WHENEVER error codes ERROR exception handler or with a TRY / CATCH block:-- WHENEVER ERROR handler WHENENEVER ERROR CONTINUE INSERT INTO orders VALUES ( rec_ord. * ) IF SQLCA.SQLCODE = -75623 THEN ... END IF WHENEVER ERROR STOP -- restore the default -- TRY/CATCH block TRY INSERT INTO orders VALUES ( rec_ord. * ) CATCH IF SQLCA.SQLCODE = -75623 THEN ... END IF END TRY Using SQLCA.SQLCODE SQL error codes are provided in the SQLCA.SQLCODE register. This register always statement error number contains an IBM® Informix® error code, even when connected to a database different from IBM Informix. STATUS is the global language error code register, set for any kind of error (even non-SQL). When an SQL error occurs, the error held in SQLCA.SQLCODE is copied into STATUS. Use SQLCA.SQLCODE for SQL error management, and STATUS to detect errors with other language instructions. When connecting to a database different from IBM Informix, the database driver tries to convert the native SQL error to an IBM Informix error which will be copied into the SQLCA.SQLCODE and STATUS registers. If the native SQL error cannot be converted, SQLCA.SQLCODE and STATUS will be set to -6372 (a general SQL error), you can then check the native SQL error in SQLCA.SQLERRD[2]. The native SQL error code is always available in SQLCA.SQLERRD[2], even if it could not be converted to an IBM Informix error. Using SQLSTATE SQLSTATE contains an error code that follows ISO/ANSI standard error specification, but not all database servers support this register. Using SQLSTATE for SQL error checking should be the preferred way for portable SQL programming, as long as the target databases support this feature. The SQLSTATE codes are defined by the ANSI/ISO standard specification, however not all database types support this standard. Table 1. SQLSTATE error codes support per database server type Database Server Type Supports SQLSTA