473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Store application data, that can be used when i re-run the application?

37
The topic says it all, but I'll also say a few words here:

I want to run a program many times and keep the data that I inserted every time. For example, if I create a person called Smith, this person should exist in the 2nd,3d,...n time I run the program. How do I do this?


P.S. I don't need code, I just need the methods, or the libraries that I have to use to do this.

Thanks in advance!
Jan 4 '10 #1
6 1396
myusernotyours
188 100+
You use a file or database. When you program is ran, it stores/writes/saves what you want in the file or database. The next time your program is ran, it reads what is in the file or database.
If you don't know how to write data to a file or a database, you need to find that out.

Kind Regards,

Alex.
Jan 5 '10 #2
AlarV
37
ok thnx.
I don't have any clue on how to create a database in java, so I'll try the text file.
Another question now: What kind of text file should I use? Cause I don't know anything of these, for example a google search gives me "binary text file" etc.
Jan 5 '10 #3
myusernotyours
188 100+
Read this

Kind Regards,

Alex.
Jan 5 '10 #4
Markus
6,050 Expert 4TB
Use a database. There are many online resources for helping with database use in Java. The same goes for using flat-file databases (text files) in Java.

When you've given it a try, post back here with a more specific problem and we'll help you from there.

Mark.
Jan 5 '10 #5
AlarV
37
Thanks for the replies. I checked the databases and as I don't know much about them, I decided to use the .txt method.

I completed the .in part and now I have to implement the stuff that are printed by the program in the .txt file (outputStream part).

Question: How do I reach the end of a .txt file to write new stuff in the .txt? I used the outputStream.println("blah") and all I had saved in the .txt were replaced by "blah".
Jan 5 '10 #6
AlarV
37
Ok thnx everyone for your help, I did what I asked for and after all it was easy :)
Jan 9 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: forums_mp | last post by:
I've got an STL class (see below) with two functions to store and retrieve data - msg structs. The "Store" function when called will copy the received message (depending on which message) into...
12
by: Sanjay | last post by:
hi, We are currently porting our project from VB6 to VB .NET. Earlier we used to make scale transformations on objects like pictureBox , forms etc.Now Such transformations are made on the...
10
by: Raghavendra RAV | last post by:
Hi, I need to store an image from a Graphics object(.NET) inside a xml data island. Anyone might have came accross or have an idea how to do this. Please share. Thanks & Regards, Raghu, CSS...
11
by: hoopsho | last post by:
Hi Everyone, I am trying to write a program that does a few things very fast and with efficient use of memory... a) I need to parse a space-delimited file that is really large, upwards fo a...
2
by: jmensch | last post by:
Hello. I'm a reasonably new ASP.NET programmer with no prior ASP or web development experience, but a lot of general programming experience. I'm using Visual Web Developer Beta Express 2005. ...
4
by: William | last post by:
After much frustration I was able to update my data store via code only. Using the data adapter was the only way I was able to set up all the objects written in my code. Basically, I cheated by...
6
by: Mike Hoff | last post by:
I am trying to write a class that will store info about database fields for building UPDATE / INSERT commands later on. I cannot seem to get the sytax correct to pass and store the data type of...
11
by: c676228 | last post by:
Hi everyone, I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store...
0
by: ramuygl | last post by:
want to create store procedure that. want to send the table name as argument and retrive the data of that argument. and want to store data in temperary table using the insert query. HERE I AM...
3
by: M.-A. Lemburg | last post by:
On 2008-08-07 20:41, Laszlo Nagy wrote: 1 It also very fast at dumping/loading lists, tuples, dictionaries, floats, etc. -- Marc-Andre Lemburg eGenix.com
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.