|
|
Re: querying an Oracle database using Java
|
Posted: Dec 12, 2009 5:35 AM
|
|
There are two things that are obviously missing in what you tried to describe. First, you may need to consult the documentation for Swing API related to JCheckBox and CheckBox. There is API that allows to determine the state and the selected item in the group. That will allow you to put the right value in your query. Second, the query you wrote should have the "WHERE' part. Here you need to specify how you want to constrain your search. The name of the column should match the actual column in the table and the value should be the one from the check box. Here is another recommendation. To get better results with queries you may need to split the query into two parts: first you need to prepare the query, then you need to provide the value from the check box and actually execute the query. This way when your application needs to search for different items in the database you save a lot of time on binding the query to the database,
|
|