Database
#16
(11-19-2022, 04:59 PM)mnrvovrfc Wrote:
(11-19-2022, 01:04 AM)bplus Wrote: Tut for @johnno56

Breaking the ice with Random access
Don't forget to close the file when done.

This "tutorial" should have had "ERASE Record" right after the first put, then show the "comments" field to demonstrate a blank record is going to have data read back in again, then use "GET" to retrieve that first record.

But what if the user wants another field, after he/she did a bunch of records in this manner? What if the user wants "comments" to have more than 60 letters, a long time after he/she created his/her first database file? Why does "date" field have to have 10 characters and any date delimeters at all? These are a few questions and more that have to be answered...

Yeah, yeah, yeah  I am already in danger of doing too much for johhno56. 
Closing the file is important if you didn't know it gets closed when program run ends, good to do it officially.

The next thing I would do with this after I knew how make a record and add it to file would be to start a central Menu of tasks and first on that list would be to append a new record. Start a data entry screen... for adding and editing.

255 was reduced to 50 so record fit across screen without starting a new line. BTW I had to delete old file when I changed from 255 chars to 50 for comment because after first old entry it was reporting 4.xx records, ha!

To erase or delete a record is a little more advanced than a simple edit, you'd have to rewrite the file to reduce the record count, same with changing or adding fields...

Gotta leave some fun for Johnno to figure out ;-))

Lets see how serious he is about all this data-basing stuff. I've already done more than he in his research I bet.
b = b + ...
Reply


Messages In This Thread
Database - by johnno56 - 11-18-2022, 08:44 AM
RE: Database - by mdijkens - 11-18-2022, 09:28 AM
RE: Database - by mnrvovrfc - 11-18-2022, 12:30 PM
RE: Database - by bplus - 11-18-2022, 01:35 PM
RE: Database - by SpriggsySpriggs - 11-18-2022, 02:13 PM
RE: Database - by Kernelpanic - 11-18-2022, 04:31 PM
RE: Database - by CharlieJV - 11-19-2022, 05:05 PM
RE: Database - by SMcNeill - 11-18-2022, 02:17 PM
RE: Database - by mdijkens - 11-18-2022, 02:37 PM
RE: Database - by bplus - 11-18-2022, 03:16 PM
RE: Database - by Kernelpanic - 11-18-2022, 03:38 PM
RE: Database - by johnno56 - 11-18-2022, 08:45 PM
RE: Database - by mnrvovrfc - 11-18-2022, 11:26 PM
RE: Database - by bplus - 11-19-2022, 01:04 AM
RE: Database - by mnrvovrfc - 11-19-2022, 04:59 PM
RE: Database - by bplus - 11-19-2022, 05:58 PM
RE: Database - by johnno56 - 11-19-2022, 08:02 PM
RE: Database - by bplus - 11-19-2022, 08:11 PM
RE: Database - by Pete - 11-20-2022, 06:55 AM
RE: Database - by mnrvovrfc - 11-20-2022, 08:17 PM
RE: Database - by bplus - 11-20-2022, 08:58 PM



Users browsing this thread: 1 Guest(s)