dcsimg
storing checkbox values in database
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aarti_Ekbote
Posted On:   Wednesday, October 24, 2007 09:53 PM

If I use to manage checkboxes, how does it get stored in the database?

In my form bean I have the getter & setter as follows:

			
private String[] selectedItems = {};
private String[] items = {"UPS","FedEx","Airborne"};
public String[] getSelectedItems() {
return this.selectedItems;
}
public void setSelectedItems(String[] selectedItems) {
this.selectedItems = selectedItems;
}


Should I have a field of type VARCHAR in my database?

Re: storing checkbox values in database

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, October 27, 2007 06:52 PM

If you are using Oracle, and if you mean VARCHAR2, then yes.
About | Sitemap | Contact