Computer Science Canada need help with database |
Author: | JHDK [ Wed Jan 14, 2004 9:32 pm ] |
Post subject: | need help with database |
A basic database for school. But i cant not get the whole thing to work!! Arrgh never mind the sample thing. please help me with this. i cant fix it. if i change some lines, something else will go wrong |
Author: | poly [ Wed Jan 14, 2004 9:40 pm ] |
Post subject: | |
use the search feature. There's probably a few tutorials that can help you out (maybe even some code). Posting your code helps too, cause we could point ya in right direction and actually see the problem your having |
Author: | Mazer [ Wed Jan 14, 2004 9:43 pm ] | ||
Post subject: | Re: need help with database | ||
JHDK wrote: A basic database for school. But i cant not get the whole thing to work!!
could anyone just give me a simple sample database plz? Well, I don't happen to have any sample databases lying around here, and to tell the truth at first I got the idea that you wanted somebody to do your whole assignment for you... but I was wrong, right? Look at this for starters:
You can use types to create your own kind of variables. That would be like a record in a database program. And each variable inside the type would be like the fields in a record of a database program. Try playing around with that a bit and see what you can find out. Then if there are problems you can ask for help and I'd be glad to help you out. (But please don't ask people to do it all for you) |
Author: | JHDK [ Wed Jan 14, 2004 9:46 pm ] |
Post subject: | |
Some common error i keep getting are: -attempt to read past eof -array subscript out of range And if i mess up with a text file once, i have to do make a new one. this usually happens when i write the data to a file, quit the program, and try to rerun it. |
Author: | McKenzie [ Wed Jan 14, 2004 10:08 pm ] |
Post subject: | |
The easiest way to handle the eof (end-of-file) is actualy to modify your data file to add an integer at the very start. this integer will be the number of records in the file. You set it to start then whenever you save the file make sure you put it back. As far as array subscript you are either looking at spot 0, or past the max size of your array. |