Informix Error Messages and Error Codes From Error 523 to 526


Informix Error Code -523 Can only recover, repair or drop table.
This statement (RECOVER, REPAIR, or DROP) specifies a view. However, these statements are only supported for real tables, not views. In the case of DROP, if you drop any of the tables used in the view, the view will be removed as well. To recover or repair this table, you must recover or repair the tables on which the view is defined. For a way to list the names of tables that are views, see the discussion of error -394.
Informix Error Code -524 Lock table can only be used within a transaction.
Because this database has a transaction log, a table can only be locked within a transaction. Review the program, and ensure that a BEGIN WORK statement is issued to start a transaction before this statement.

Informix Error Code -525 Failure to satisfy referential constraint constraint-name.
During an ALTER TABLE or SET statement, you have added or re-enabled a referential constraint that the data in the table violates. Check that the data in the referencing column (child key) exists in the referenced column (parent key).

Informix Error Code -526 Updates are not allowed on a scroll cursor.
For a DECLARE statement, the clause FOR UPDATE is not allowed in conjunction with the SCROLL keyword. For an UPDATE statement in an ANSI-compliant database (in which the FOR UPDATE clause is not required when declaring a cursor for update), the cursor named in this statement was declared with the SCROLL keyword and may not be used for updates. The way a scroll cursor is implemented makes it unsafe for updating a table, since it will sometimes not reflect the current state of the selected rows. If you want to use a scroll cursor to examine rows and then update them, you may redesign your application in the following way (among many). Use the scroll cursor to select also the ROWID of each row. Declare a second, nonscrolling cursor that selects one row for update based on its ROWID. When it is time to update a selected row:
Open the update cursor using the ROWID value found by the scrolling cursor.
Fetch the row, and check the error code (the row might have been deleted).
If the fetch succeeded, verify that the row contents are unchanged from those selected by the scrolling cursor (the row is now locked, so it cannot change further, but it might have changed between the two fetches).
If the row is unchanged, update it using the nonscrolling cursor.
Close the nonscrolling cursor.
This procedure ensures that the update reflects the current state of the table but also retains the convenience of the scrolling cursor. A fetch by ROWID of a recently fetched row will usually entail no disk activity and so will not cost much time.

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 *