Computer Science Canada

simple database help

Author:  kanye_west_owns [ Tue May 11, 2004 4:39 pm ]
Post subject:  simple database help

how can i make a simple database, by just asking a question the user inputs it, and then it saves it to the same file, so the user can actually come back and the information will still be there even if the program was restarted... i need lots of help Very Happy

Author:  Tony [ Tue May 11, 2004 4:59 pm ]
Post subject: 

well if you simply want to write down some values to use later on... simple file i/o will do fine. It gets a bit more complicated if you want to write down records Confused

Author:  kanye_west_owns [ Tue May 11, 2004 5:29 pm ]
Post subject: 

but if i do it this way, itll delete everything in my file, i want it to be in the same file, and to run along side the other codes.

Author:  Tony [ Tue May 11, 2004 5:37 pm ]
Post subject: 

not if you skip to the end of the file Thinking
Turing Documentation wrote:

var streamnumber : int
open : streamnumber, "myfile", put, mod, seek
seek : streamnumber, *
put : streamnumber, "This appears at the end of the file"

Author:  kanye_west_owns [ Tue May 11, 2004 6:47 pm ]
Post subject: 

GOD DAMN, its too hard to do this... Twisted Evil Evil or Very Mad Embarassed Crying or Very sad

Author:  TheFerret [ Tue May 11, 2004 9:57 pm ]
Post subject: 

You could try reading the file at teh beginning and put the data into an array and read the stuff from there...

P.S. There is harder things to do in Turing, such as making a 3-D Triangle spin that has coloured faces...