When I run this code I get default value as "sorry" instead of original value. Here is my code:
sle_dbms.text = ProfileString( "C:\database.ini" , &
"DBMS" , "DBMS" , "Sorry" )
sle_database.text = ProfileString( "C:\database.ini" , &
"DBMS" , "ServerName" , "Sorry" )
sle_name.text = ProfileString( "C:\database.ini" , &
"DBMS" , "LogId" , "Sorry" )
Please help me to fix this query...
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:
Result: Third ProfileString returns default because 'LogId' not in INI file