Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / daphne

Before going to the solution, here is the explanation of a
null indicator.

In DB2, a NULL is stored using a special one-byte null
indicator which is attached to every NULLABLE column. If
the column is defined as NULL, then the indicator field is
used to record this. The indicator variable is transparent
to an end user, but must be provided for when programming
in a host language.

A positive value or a value of 0 means the column is not
null and any actual value stored in the column is valid. A
negative value indicates that the column is set to null. If
the value is -2 then the column was set to null as the
result of a data conversion error. The default is null.



There are two reasons for getting -305.

1) As said in the first answer if the table column is
defined as NOT NULL (with no default) and if we try to
insert a null value we get that.
- This should be resolved by making sure the inserted
value is not null. Null indicator cannot be used here since
the column is defined as NOT NULL.


2) A table column is defined as NULL:
The host variable has a not null value. The Null
indicator is not set in the host program, so the null
indicator is defaulted to a negative value.
- This should be resolved by using a null indicator in
the host program and moving the relevant value to the null
indicator.

Is This Answer Correct ?    56 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of page locks can be held in db2?

994


what is the responsibility of the construction superintendent

2080


Can we update view in db2?

945


How and when does the db2 enforces the unique key?

1029


What does sqlcabc has?

994


What is db2 stogroup?

1095


What is the maximum size of varchar data type in db2?

1066


What is a collection in db2?

983


What is a Foreign Key?

1037


Is db2 free?

1036


What is meant by dclgen?

1060


How would the varchar column remarks defined?

1036


What are the uses of db2 optimizer?

1223


What is difference between isnull and coalesce?

1007


What is the max length of sqlca?

1157