A User Account File System. Fast Find, Fast Add!
This code is a very quick way of getting data from a file.
Original Author: Paul Spiteri
Inputs
RAFSearch, used to get data returns the MyData variable type.
You need to pass a parameter for the ID to find.
RAFAdd needs to be passed the ID of the new record, and as it currently stands, the Name and Password of the 'user' being added. This will need to be changed to suit you.
Assumptions
None.
Returns
RAFSearch returns the MyData variable type.
Therefore you should do:
Dim TempData as MyData
TempData = RAFSearch(50)
TempData will now have the data for ID 50.
If TempData.ID = -1, the record does not exist.
RAFAdd returns a boolean. True if it was added successfully, false if it was not - probably a full file, increase the MaxRecords variable and start again.
Side Effects
The MaxRecords can only be changed once, when the RAFClear is executed, which clears and sets up the pointer file.
API Declarations
None.
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 93 times
Categories
Attachments
CODE_UPLOAD70206232000.zip
Posted: 9/3/2020 3:45:00 PM
Size: 3,554 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.