Informix Error Messages and Error Codes From Error 284 to 290

SQLServerF1

Informix Error Code -284 A subquery has returned not exactly one row.
A subquery that is used in an expression in the place of a literal value must return only a single row and a single column. In this statement, a subquery has returned more than one row, and the database server cannot choose which returned value to use in the expression. You can ensure that a subquery will always return a single row. Use a WHERE clause that tests for equality on a column that has a unique index. Or select only an aggregate function. Review the subqueries, and check that they can return only a single row.
This error can also occur when you use a singleton SELECT statement to retrieve multiple rows. You must use the DECLARE/OPEN/FETCH series of statements or the EXECUTE INTO statement to retrieve multiple rows.
Informix Error Code -285 Invalid cursor received by sqlexec.
The cursor that this statement uses has not been properly declared or prepared, or the FREE statement has released it. Review the program logic to ensure that the cursor has been declared. If it has, and if the DECLARE statement refers to a statement id, check that the referenced statement has been prepared.

Informix Error Code -286 Default value of the primary key column column-name is NULL.
A column that is part of a primary key cannot have null as its default value.
Informix Error Code -287 Cannot add serial column column-name to table.
You cannot add a column of SERIAL data type to an existing table. Such columns may not contain null values, but when you add a column, the database server must put null values in all existing rows. You can add a serial column in three steps. First, add the column with an INTEGER data type. Then update the table with nonnull, unique values in each row of the new column. Finally, use ALTER TABLE MODIFY to change the data type of the column to SERIAL.

Informix Error Code -288 Table table-name not locked by current user.
This UNLOCK TABLE statement names a table that has not been locked. If you locked the table earlier, it has already been unlocked. Tables are unlocked automatically when a transaction ends or when the database is closed. If another user locked the table, you cannot unlock it.
Informix Error Code -289 Cannot lock table table-name in requested mode.
The table is already locked in exclusive mode. You will have to wait for the table to be unlocked before you proceed.
Informix Error Code -290 Cursor not declared with FOR UPDATE clause.
This statement attempts to update with a cursor that was not declared for update. The database server does not allow this action, as both a security measure that is designed to prevent program errors and a performance feature. To use a cursor with the UPDATE or DELETE statements, you must declare it for update. Review the program logic to make sure that this statement uses the intended cursor.

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.

Thanks,
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 *