Getting sqlcode -305 instead of 100 while fetch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Amrish
    New Member
    • Apr 2015
    • 1

    Getting sqlcode -305 instead of 100 while fetch

    Hi,

    I am trying to fetch a cursor, in a select statement I am selecting a field which can have Null values.

    The record which I am fetching is not present in the DB2 table. Hence on fetch I expect sqlcode of 100 however I am getting the sqlcode of 305-. I am doing this in a program.

    Other details: If I run same sql in spufi without any cursor I get sql code 100 which is right as the record doesn't exist in the table.

    However if I run the same query in an program using cursor I get sqlcode 305-. I am using one more cursore before this and checking the retrun code 0 to enter in the above cursor where I am getting sqlcode -305.

    Kindly let me know the cause for the same.

    Regards,
    Amrish
Working...