This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes manipulating the database in .txt file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "manipulating the database in .txt file " Watch "manipulating the database in .txt file " New topic

manipulating the database in .txt file

Thamu Gurung
Ranch Hand

Joined: Feb 02, 2010
Posts: 39

Iam a Java student and I got some problems manipulating the database which is stored in the .txt file .I know how to read that file and get it printed out.But how to update(add,delete , modify) the data automatically in that .txt file .Please help
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

What are you using here, a database or a text file?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

The TXT is used like a database ?

Not a good idea since there is no structure what so ever. Do you need a file based structure or a file based database ?

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Aditya Kanitkar
Ranch Hand

Joined: Aug 08, 2009
Posts: 72
If i'm not mistaken.....

In short, you want to Add,Update or delete contents in the TXT file... right?

And for that, you need to look into FileHandling... I think BufferedReader can help you out...

I agree. Here's the link:
subject: manipulating the database in .txt file
jQuery in Action, 3rd edition