|
-
Jul 2nd, 2002, 12:12 AM
#1
Sub Keys in an INI file
I have a small program to build but i want to avoid a database. I will have a list of residents (10 in total) that i want to keep detail on. can i nest keys inside an INI file:
[Residents]
[Resident0001]
[Room#] = ##
[etc.] = "an on and on"
[Resident0002]
[Room#] = ##
[etc.] = "an on and on"
[Resident0003]
[Room#] = ##
[etc.] = "an on and on"
If you can, I need help on the syntax, if not, it figures.
Thanks
-
Jul 2nd, 2002, 12:22 AM
#2
PowerPoster
group your data by the delimiter of ; or , with a single key like:
[Residents]
; Subkey = Room#;etc
Resident0001=#1;an on an on
Resident0002=#2;an on an on
Resident0003=#3;an on an on
then juz split the data with the Split function
-
Jul 2nd, 2002, 03:31 AM
#3
Addicted Member
have you thought about using the Random FIle Format thats been with Basic since GW basic in the 80's. Its flexible, bit old fashoined, but for what you are trying to achieve, it's what I would use and still works with VB !!
-
Jul 2nd, 2002, 03:44 AM
#4
PowerPoster
for random file, you need to define your data structure at the first place 
VB Code:
Private Type MyRecord
RoomNo As Integer
Etc As String * 128
End Type
But with this, you need to fixed the string length, for shorter reading time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|