Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Abdullah khaled

Greenhorn
+ Follow
since Feb 04, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abdullah khaled

Abdullah khaled wrote:

Dave Tolls wrote:Your method is structured like this:


Now, If an exception other than a SQLException is thrown then you will never know, because you have put a return in the finally clause.  That exception will be lost entirely.

Move the return statement outside the finally block and then you'll see the exception that is happening, and that you are hiding at the moment.




Sorry i've just realized that i set an id for an object that doesn't exist yet, i don't know how to edit my reply so sorry about that

Dave Tolls wrote:Your method is structured like this:


Now, If an exception other than a SQLException is thrown then you will never know, because you have put a return in the finally clause.  That exception will be lost entirely.

Move the return statement outside the finally block and then you'll see the exception that is happening, and that you are hiding at the moment.



thank you so much, now i got a NullPointerException in the same line however my query works as it should in SQLDeveloper as shown in attachments can you help me please?

Claude Moore wrote:And welcome to the ranch !


thanks
hi everyone,
i have 3 tables "Subject","Prerequisite",and "DEP_PREREQ" the least was made to handle a many to many relation
(Screenshots included as attachments)
i wrote this to return a list of specific columns

but when it reached the line with asterisk (line:17) the loop just stooped and an empty list was returned, why this happened?