aspose file tools*
The moose likes JDBC and the fly likes Values from ListBox to be inserted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Values from ListBox to be inserted" Watch "Values from ListBox to be inserted" New topic
Author

Values from ListBox to be inserted

Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
I have a web page that forwards listbox selected values to my servlet that receives it in a String Array. How would I insert this into a dbase? Is there some datatype in mysql that can help me with this? or should I format all the values into one String and then insert it normally?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

Originally posted by Tontang Bei:
I have a web page that forwards listbox selected values to my servlet


That doesn't make much sense to me. If the page is being forwarded to a servlet, it will not yet have had a chance to be displayed in the browser, and so how would the selection be made?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
Sorry, I mean after the user hits the submit button the values are extracted in a servlet
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

OK, so it seems that from there you are confused as to how to save the values into a DB. So I've moved this post to a more approriate forum for such as discussion.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Tontang,
Do you have a database already set up? If so, what does the schema/ddl/table structure look like?

If not and you get to design it, consider storing each listbox value in a separate row.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Values from ListBox to be inserted