Home -> Programming -> Storage -> Random Data Files

Random Data Files

In VB 6 there was a provision fro reading and writing random files. These are files composed of records which are of fixed length. Since you can read or write any record, and jump around in any order the user desires, they were known as random files. Unfortunately this ability is only preserved for legacy code and has no modern equivalent.

It would appear that Microsoft wants you to do this in a different way. That way is to allow VB to tap into database files and read or write records directly from or to a database file. VB 6 also had this ability, but since creating files is easier in a database, it appears that a decision was made to drop radom files in favour of using database files instead. In truth, it is easier for a novice to create the file in a database. The file can then be manipulated either from the database - Access - or by using a VB program coded to read and write to the database. So this section will show you how to accomplish this.