DeleteSetting Woes (VB4) 
Author Message
 DeleteSetting Woes (VB4)

Using VB4 in both W95 and W3.1 environments.

I want to keep my .ini file in my application directory to allow
multiple installations of the same product on the same machine,
each with their own "personality".  I cannot get the DeleteSetting
statement to work when the ini file is in the application directory.
Any clues would be appreciated.

Sample code:

Private Sub MakeIniSection(MyAppName As String, SectName As String)
    SaveSetting MyAppName, SectName, "Entry01", "First entry"
    SaveSetting MyAppName, SectName, "Entry02", "Second entry"
    SaveSetting MyAppName, SectName, "Entry03", "Third entry"
End Sub

Private Sub TestIniDelete()
    ' following three lines work for writing a file to windows
    ' directory, then deleting the first section created
    MakeIniSection "INITEST", "Section01"
    MakeIniSection "INITEST", "Section02"
    DeleteSetting "INITEST", "Section01"

    ' first two lines work; write settings to directory containing
    ' the executable.  Third line fails with Run Time error '5'
    ' Invalid procedure call
    MakeIniSection ".\INITEST", "Section01"
    MakeIniSection ".\INITEST", "Section02"
    DeleteSetting ".\INITEST", "Section01"
End Sub

--
Dennis Galvin



Tue, 01 Dec 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. deleteSetting gives error in vb4/16

2. DeleteSetting in vb4/16 Syntax Error

3. 16-bit VB4 Setup Wizard Woes

4. VB4 and WFW setup woes

5. VB4 setup woes

6. Invalid procedure Call when using Access95 DeleteSetting

7. DeleteSetting Question

8. deletesetting

9. DeleteSetting help for newbie

10. DeleteSetting...What am I doing wrong?

11. DeleteSetting

12. Bug in DeleteSetting function

 

 
Powered by phpBB® Forum Software