aspose file tools*
The moose likes Java in General and the fly likes Solved : Java CheckBox to insert data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Solved : Java CheckBox to insert data" Watch "Solved : Java CheckBox to insert data" New topic
Author

Solved : Java CheckBox to insert data

Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Problem solved, Thank you very much for all who read and reply.

I'm using Netbeans 7.0 to develop a programme to Insert data into a MS Access database.


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19693
    
  20

Welcome to the Ranch!

Could you next time please indent your code? It's almost impossible to read like this.

Sander Silva wrote:

1) There is no difference between insert2, insert3 and insert4. All that differs is the arguments when you call them. Make them into two methods, and rename them for clarity.
2) Those execute lines won't even compile; that's not how you concatenate Strings. You need + for that:
Of course, PreparedStatement is the preferred way because it prevents SQL injection (look it up if you don't know what that means).

My program is now able to add all 3 fileds via it's UI.
I have 3 colors in 3 checkboxes, now it is only capable of
adding only 1 color at a time. When I select more than 1 color (2 or3)
it's not working.

That's because you only call insert1 and insert2. You never call insert3 or insert4. You'll need to call four insert statements:

Thank you very much 4 reading my post. Hope som1 can give lil help.
Havanice day!

Please UseRealWords: "for" not "4"; "someone" not "som1". "little" not "lil". "Have a nice day" not "Havanice day".


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Oh woderful reply. 100% clear.
My problem is fully solved.
Thank you 1000 times!
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4542
    
    5

Sander Silva wrote: Oh woderful reply. 100% clear.
My problem is fully solved.

I'm happy for you, but wouldn't you like to share your joy with the good folks over at the Oracle forums, so they don't waste time on your question?

Here too, we ask that you BeForthrightWhenCrossPostingToOtherSites


luck, db
There are no new questions, but there may be new answers.
Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Oh Sorry for wasting time on others. I delete all my posts @ other forums including Oracle forum.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38788
    
  23
Sander Silva wrote:. . .. I delete all my posts @ other forums including Oracle forum. . . .
No, don't delete any posts. It makes the replies look nonsensical. What you should do is post a link saying "somebody on JavaRanch helped me," or similar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Solved : Java CheckBox to insert data