Results 1 to 2 of 2

Thread: ini file problems

  1. #1
    Guest
    I always used the Get & WritePrivateProfileString to write and read ini files, but today when i wrote a new line of code using the same old line i always used i got a weird error massage:
    compile error: type-decleration character does not match declared data type.
    what is the problem?

    this is the line its the same as i always used:

    inipath$ = App.Path & "\file.ini"
    If Dir(inipath$, vbNormal) = "" Then
    rc% = WritePrivateProfileString("Database", "Path", "", inipath$)
    'read
    lngResult = GetPrivateProfileString("Database", "Path", inipath$, strResult, Len(strResult), inipath$)
    DBPath = Trim(strResult)

    this got something to do with the $ sign but now it seems that the entire program cant deal with this sign, and it worked before, and its working in another program i wrote...
    when taking off the $ the program works but you cant read the ini file just write it..

    ..thanks..

  2. #2
    Hyperactive Member JazzBass's Avatar
    Join Date
    Jun 1999
    Posts
    393

    Check your original Post

    Check your first post. I posted a reply there.
    JazzBass
    JazzBass
    In the .NET era
    Trying to remember VB6
    Progress:
    XP Professional @ Home
    and @ the Office

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