Informix Error Messages and Error Codes From Error 265 to 269


Informix Error Code -265 Load or insert cursors must be run within a transaction.
You attempted to open an insert cursor. This database has a transaction log. In such a database, you must execute a BEGIN WORK statement before you open a cursor that is declared with an INSERT statement or with the FOR UPDATE clause. Revise the logic of your program so that it starts a transaction before it opens the cursor.
You can ensure that the program also works in databases that do not have a transaction log. Change the program so that immediately after it executes the DATABASE statement, it saves the contents of the second element of the SQLAWARN array of warning flags in the SQL communications area. This element will contain a space if the database does not use transactions, and the letter W if it uses them. At each point where a transaction logically begins or ends, test the saved value. If it contains W, execute the transaction statement to begin or end a transaction.

Informix Error Code -266 There is no current row for UPDATE/DELETE cursor.
The current statement uses the WHERE CURRENT OF cursor-name clause, but that cursor has not yet been associated with a current row. Either no FETCH statement has been executed since it was opened, or the most recent fetch resulted in an error so that no row was returned. Revise the logic of the program so that it always successfully fetches a row before it executes this statement.
Informix Error Code -267 The cursor has been previously released and is unavailable.
The FREE statement released the resources that are attached to the cursor named in this statement. Before you can use the cursor, you must again prepare the SQL statement that is associated with it. If the cursor was declared FOR a statement, re-execute its DECLARE statement. If it was declared FOR a statement identifier, execute the PREPARE statement again.

Informix Error Code -268 Unique constraint constraint-name violated.
During execution of this statement, a duplicate value was introduced into a column or columns that a unique constraint protects. The row with the duplicate value was not allowed into the table (not inserted or not updated). For Informix Dynamic Server and INFORMIX-OnLine, any changes that this statement made prior to the discovery of the duplicate value have been rolled back. (The effects of preceding statements in the transaction, if there were any, remain in effect. They must be explicitly rolled back or committed.)
Informix Error Code -269 Cannot add column column-name that does not accept nulls.
This statement requests a new column that has the NOT NULL constraint. However, when a column is added to an existing table, null values have to be installed in the existing rows. Define a new table that includes this column, then INSERT the data from the old table into it to provide some suitable nonnull values for this column.

Above are list of Informix Error Messages and Errors Codes or Status Codes or Exit Codes along with Error and Warning messages received while performing certain operation against Informix applications or related products.

What are Informix Error Messages?
All Informix messages returned by the Informix server are assigned an error code.

In general, each Informix error contains the following information:
• The Informix Error Code or Informix Error status
• The message text. This text is usually returned with the Error code. Some messages employ word substitution, where the word substituted represents the system-replacement of a term more specific to the occurrence.
• An explanation of how the error may have occurred.

Hope this was helpful.

SQLServerF1 Team
Information about Informix Error Codes or Status Codes or Exit Codes and Error Messages on Windows, Linux Operating Systems.


Leave a Reply

Your email address will not be published. Required fields are marked *