DC_ReadINI issue

This forum is for eXpress++ general support.
Post Reply
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

DC_ReadINI issue

#1 Post by BruceN »

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
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4829
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_ReadINI issue

#2 Post by rdonnay »

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.

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.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: DC_ReadINI issue

#3 Post by BruceN »

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 :)

User avatar
rdonnay
Site Admin
Posts: 4829
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_ReadINI issue

#4 Post by rdonnay »

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.

Code: Select all

url := DC_INIREAD(ini_file, 'FTPSETUP', 'url')
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: DC_ReadINI issue

#5 Post by BruceN »

interesting... that did it. we learned something :)

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

bwolfsohn
Posts: 651
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: DC_ReadINI issue

#6 Post by bwolfsohn »

BruceN wrote:interesting... that did it. we learned something :)

thanks
yes, case sensitive.. that's bitten me more than once..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
breadmanbrian@bsky.social
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Post Reply