You didn't provide enough information to answer conclusively. Rather than leave this unanswered, will provide extra information so that it can be answered and help others with same challenge.
Scenario 1
INI file named c:\database.ini does not exist
Result:
All three calls to the ProfileString function return the default 'Sorry' because there was no ini file
Scenario 2:
INI File exists with the contents like:
[DBMS]
DBMS=Hello
DSN=World
ServerName=Matrix
LoginId=jdoe
DebugLevel=1
Result: Third ProfileString returns default because 'LogId' not in INI file
// These find respective file, section, key and therefore return the ini value
ProfileString("C:\database.ini", "DBMS", "DBMS" "Sorry") will return 'Hello'
ProfileString("C:\database.ini", "DBMS", "ServerName", "Sorry") will return 'Matrix'
// File & section found but key 'LoginId' was misspelled so returns default 'Sorry'
ProfileString( "C:\database.ini","DBMS", "LogUserId", "Sorry") will return 'Sorry'