I'm probably overlooking something incredibly stupid, but... my dc_ReadINI isn't getting anything, it's returning a blank string.
ini_file := path1 + '\MS.INI'
if Fexists(ini_file)
url := DC_INIREAD(ini_file, 'FTPsetup', 'url')
endif
MS.INI file is:
[FTPsetup]
url=ftp.outdoorresourcesllc.com
I tried it with hard wiring the path as well and still get "" returned.
What incredibly obvious thing am I overlooking???
thanks
DC_ReadINI issue
DC_ReadINI issue
There are only 10 kinds of people - those who understand binary and those who don't 

Re: DC_ReadINI issue
The code looks correct.
I'm concerned about the variable path1 and what it contains.
Put some debugging in the code to make sure that it returns the correct path.
I'm concerned about the variable path1 and what it contains.
Put some debugging in the code to make sure that it returns the correct path.
Code: Select all
ini_file := path1 + '\MS.INI'
wtf ini_file
if Fexists(ini_file)
wtf 'yes it does exist'
url := DC_INIREAD(ini_file, 'FTPsetup', 'url')
endif
The eXpress train is coming - and it has more cars.
Re: DC_ReadINI issue
wtf shows it exists... i also hard wired it (d:\configv9\bikestop\ss.ini) and still got "" returned
There are only 10 kinds of people - those who understand binary and those who don't 

Re: DC_ReadINI issue
This is very strange.
I get the same results as you, yet DC_IniRead() works fine on other .INI files.
I discovered that the group heading must be all CAPS.
I get the same results as you, yet DC_IniRead() works fine on other .INI files.
I discovered that the group heading must be all CAPS.
Code: Select all
url := DC_INIREAD(ini_file, 'FTPSETUP', 'url')
The eXpress train is coming - and it has more cars.
Re: DC_ReadINI issue
interesting... that did it. we learned something 
thanks

thanks
There are only 10 kinds of people - those who understand binary and those who don't 

Re: DC_ReadINI issue
yes, case sensitive.. that's bitten me more than once..BruceN wrote:interesting... that did it. we learned something
thanks
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises