Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

return code value in sqlca communiction area (Pro *c)

user601042Jan 21 2009 — edited Sep 9 2010
Hi ,
We have code snippet as following
Actually employee table is having following data

emp_id emp_name

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
123 john
124 peter

====================
Value i'm passing li_emp_id with 9999 for following code

EXEC SQL UPDATE employee
SET emp_name ='test'
where emp_id=:li_emp_id;

return(sqlca.sqlcode);
===================
In this particular case we know there wont be any rows updated(There is now row in employee table for empid 9999). So i'm expecting sqlca.sqlcode value is 0. Based on that we are handling exception. But its actually coming as 1403.

Will this vary depends upon enviroment...Do i need to update any enviroment variable to get 0 instead of 1403

Please let me know your suggestions. thanks is advance for your help

thanks
Kannan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2010
Added on Jan 21 2009
3 comments
808 views