How to resolve the -305 error code in DB2?
And also please let me know, how to resolve the db2 error
codes.

Answer Posted / vikram and mangesh

The null value is the concept of DB2 and your application
program does not understand the null concept, so to handle
the null value in our application program we use null
indicator.

Null indicator will have following values(depending upon
what values comes from DB2).
0 means the column is not null and any actual value stored
in the column is valid.
-1 means column is set to null.
-2 means column was set to null as the result of a data
conversion error.


in above scenarion if your table contains nullable columns
(means the column can have null values) and in aplication
program you dont mentioned the null indicator,you will get
sql code -305.

For a NOT NULL column there is no need of null indicator as
there cannot be null at any point of time and if you dont
give any value then you will get SQL code -407.

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would the varchar column remarks defined?

624


define clustering index.

612


How can record locking be achieved in those DB2 versions which do not support it?

613


What is database reorganization?

583


What is bind and rebind in db2?

640






What does sqlcabc has?

625


What is the use of value function?

613


What is the role of schema in the db2 database?

642


Which are the db2 tools to protect integrity of the database?

680


What is host variable?

585


Explain correlated sub-queries.

581


What is a dbrm in db2?

572


How would you find out the total number of rows in a db2 table?

570


What is db2 stogroup?

668


what is diffrence b/w file-aid tool and file-aid utility???

4167