Originally Posted by
raghav_sy
hi,
making use of, dbms_ouput.put_line, this is the way to debug any pl/sql code.
show error is useful to find the errors at compilation not for runtime errors.
i will give a brief idea, abt some of the things to be kept in mind:
use dbms stmnt...
1) while entering pl/sql block: this will make sure that your code started the execution.
2)use dbms to print all the values u are recieving from the calling env. --to make sure that u are getting the correct values.
3)before select stmt, use DBMS to print whcih select stmt u are performing.
3)after every select stmnt. in your code use dbms to print values fetched by that select stmt.
4)after every select stmt. use DBMS to print the posible error using SQLERRM. like this
dbms_output.put_line('the error for selecting employee detail is:' ||SQLERRM);
5)then if u are making any calls to any of the pl/sql code, use DBMS to print the vlues u will be sending to called sub-program.
6)print when u are exiting the program.
there are lot of ways where u can use DBMS, i think the above points will give an idea to experiment more.
regards,
RSY