Results 1 to 2 of 2

Thread: Different things in one file

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    21

    Different things in one file

    OK say you want to store stuff in a file, say different users and all their settings etc., and there is a facility in the program to make new users, all can have different settings. I currently have to create one file for each user, and i want to know how to be able to only use one file, but i need to be able to distinguish between the users.

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    There are a number of ways to accomplish what you want.

    For example;

    Use a delimiter to denote the begin and/or end of a user's settings, i.e.
    <SETTINGS>
    UserName = "Joe Bloggs"
    Var1 = "Blah"
    Etc..
    </SETTINGS>
    Use a fixed width file format, i.e.
    Each set of data is a fixed number of characters long, then use the Random operator when opening the file.

    Use an MDB and store the data in a table.

    Use the Registry.

    Use an INI file and use the INI API's to read/write it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width