This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Importing data from a file to a MS-Access database table in java

 
Saumyaraj Zala
Ranch Hand
Posts: 56
Android Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a file which consists of data like:-

Question 1: Pick the odd one.
option 1:cat
opion 2:peacock
option 3:kite
option 4:eagle
answer:cat

Now i want to store this in an Ms-Access database table which has following columns:-

question option1 option2 option3 option4 answer

Which input file will be easier to import data to table in this format?
I want to do this programmatically and i am using jsp/servlets for this web application. Which method or library to use?
Thankyou.
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question is unclear. What are you having problems with?
Uploading the file?
Parsing the file to identify the actual data?
Connecting to the DB?
Inserting the parsed data into the DB?
Anything else?
 
Saumyaraj Zala
Ranch Hand
Posts: 56
Android Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know which type of file(csv,txt e.tc) will be best or easy to import in the following format and how to parse it.
I had no problems with connection to database.
Thankyou.
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the easiest would be to go for a csv format and use something like http://opencsv.sourceforge.net/
 
Saumyaraj Zala
Ranch Hand
Posts: 56
Android Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic