aspose file tools
The moose likes JDBC and the fly likes inserting checkbox in database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "inserting checkbox in database" Watch "inserting checkbox in database" New topic
Author

inserting checkbox in database

Deepak Chawla
Ranch Hand

Joined: Nov 19, 2003
Posts: 50
I have a checkbox in the form, i want that when i hit submit, it should insert its information in database. can anyone tell me how to do that.
Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56229
    
  13

What have you tried on your own? What code have you written and where are you having problems?
bear


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Deepak Chawla
Ranch Hand

Joined: Nov 19, 2003
Posts: 50
That's what i am trying to ask because i know i can insert other fields in database but do i have to create a field in database for that checkbox and also how that field will recognize a check.
ANy sugesstions???
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
It's up to you to determine how you want to represent a checkbox value in your DB. The key is storing the appropriate value and interpreting the value correctly when it's retrieved from the database to be displayed on the screen. Some people use 1/0, on/off to indicate checked/unchecked.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: inserting checkbox in database
 
Similar Threads
html:checkbox
Requesting Example for usage of CheckBox in JSP
How to enable checkbox from value fetched from database
How to store the multiple check box values in the form bean
Javascript or vbscript and ASP