File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Writing the csv file to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Writing the csv file to database" Watch "Writing the csv file to database" New topic
Author

Writing the csv file to database

Buddha Raju
Greenhorn

Joined: Jun 01, 2005
Posts: 15
Dear All.
I am having a result set. I need to read the result set and create a CSV file and store the CSV file in to the database table. Please let me know how to do this. It will be great help for me if you send the code.


Raju
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

It will be great help for me if you send the code.


JavaRanch is not a code mill. You'll get lots of help with writing code, but you'll find that few people will be willing to do all the work for you.

So what have you come up with so far?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Buddha Raju
Greenhorn

Joined: Jun 01, 2005
Posts: 15
Sorry Bear Bibeault . I need some help

Raju
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

Originally posted by Buddha Raju:
I need some help


Start writing code !!! everyone is looking forward to help you if you face any problem

Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

Shailesh is correct, you will receive lots of help with writing your code. You will receive less help trying to get someone to write it for you. Have you even an outline (pseudo-code) of what the code should do? Have you tried writing anything down yet? If so, post it here as a starting point.
[ June 18, 2005: Message edited by: Bear Bibeault ]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Well, forget about csv file. Just go with any file like jpg, gif, txt. All goes through the same process.

- get the file in binary
- make that as a blog object
- insert that into DB

Try google around you will get many hints.
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
This request seems like a strange one. Why would you want to store the data as a csv, when it is always easy to store the data in a table and later format it to csv when you take it out/query it again? Sort of the equivalent of storing html in your database instead of generating it.


http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing the csv file to database