|
-
Apr 7th, 2000, 04:04 AM
#1
Addicted Member
First Question:
Yes you can store multiple entries into the Registry, but I wouldn't recomend it, especially when the number could drastically change. Instead, if you want to store multiple entries where they're are the same basic value (eg. Username) and store the same basic data and data type, then you should look into storing them as a Multi SZ string. What's a Multi SZ string? A Multi SZ string is a Registry data-type which is basically one string that contains multiple strings within it. Each string element within the whole string is/should be separated by a NULL character and the entire string should be terminated with two NULL characters. When you want to put a Multi SZ string into the value in the Registry use the Join function to bring all the string together, for example:
Code:
sMultiSZ = Join(asUserNames, vbNullChar)
sMultiSZ = sMultiSZ & vbNullChar
When you want to retrieve the data use the following to get the strings out of the Multi SZ string:
Code:
Dim asUserNames() As String
asUserNames = Split(sMultiSZ, vbNullChar)
If asUserNames(UBound(asUserNames)) = vbNullString Then
ReDim Preserve asUserNames(UBound(asUserNames) - 1)
End If
Second Question
Look into SQL (Structured Query Language)!
PS
Also for the first quesion, I was under the assumption that you know how to send and retrieve values from the Registry. If you don't just let me know and I'll post it, but you should try searching this site and MSDN first, they can probably explain it better. Later.
[Edited by SonGouki on 04-07-2000 at 05:09 PM]
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
|