aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 15286
    
    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 - A Test Data Generation Platform
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Selection from Database - Try/catch error
 
Similar Threads
Getting Largest Row Number
Insert into statement using JDBC
Problems Inserting Info. into Access DB
Trouble Displaying all the data
HELP! Connection to MS Access DB Trouble