GeeCON Prague 2014*
The moose likes JDBC and the fly likes Selection from Database - Try/catch error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Selection from Database - Try/catch error" Watch "Selection from Database - Try/catch error" New topic
Author

Selection from Database - Try/catch error

Kassi Hill
Greenhorn

Joined: Sep 29, 2003
Posts: 24
Good morning Ranchers. I am working a method that retrieves Questions from a Database. If the qType is False, then I need to select 3 chices from another table and load them into an Arrary.
I am having trouble. I am getting a Try without a catch error message but my try/catch is there. Also, when I do a second selection do I need to add a second try/catch??
Your help is GREATLY appreciated. Thank you.
Code:

[ October 21, 2003: Message edited by: Gregg Bolinger ]
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
why not just do an outer join to Choices table?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

You need to switch this line:

And this line:

Also, it is always a good idea to make use of UBB Code Tags when posting code. It makes it easier to read. I have edited your post to reflect this difference.
[ October 21, 2003: Message edited by: Gregg Bolinger ]

GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

How it should be:

[ October 21, 2003: Message edited by: Gregg Bolinger ]
Kassi Hill
Greenhorn

Joined: Sep 29, 2003
Posts: 24
Thank you for your help!! This fixed my problem.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Selection from Database - Try/catch error