Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 5th, 2006, 11:44 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to store text file in database

I simply want to browse a text file and wants to store
it in database(mysql).would you tell me please how to do this.

__________________
regards ,Vivek
Reply With Quote
  #2 (permalink)  
Old February 13th, 2006, 05:29 AM
Friend of Wrox
 
Join Date: Jan 2006
Location: San Francisco, CA, USA.
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You should look at using MySQL's LONGBLOB or LONGTEXT data type. They can store up to 4 gigabytes of binary or textual data, respectively. You can use the regular MySQL JDBC connector methods for storing and retrieving LONGBLOB and LONGTEXT types.

However, storing this kind of data in the database is inefficient. You should seriously consider storing the text file on the file system instead. You can put it in the /WEB-INF/ folder to prevent direct access to it by HTTP requests.

Jon Emerson
http://www.jonemerson.net/
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read file and store it to database sparsh2010 Access VBA 3 July 17th, 2008 08:27 AM
store a single line of text from a file....how???? danielnixon General .NET 2 May 1st, 2008 12:09 PM
How to store MS Word File in database kesar SQL Language 2 March 1st, 2007 06:34 AM
how to store a text file vivekkumar_23 SQL Server 2000 2 July 4th, 2006 09:18 AM
how to store file in sql server 2000 database vivekkumar_23 SQL Server 2000 1 February 27th, 2006 10:41 PM



All times are GMT -4. The time now is 08:00 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.