Board index » delphi » IniFile.ReadSection() problems

IniFile.ReadSection() problems

Seems easy enough, but I cannot get the ReadSection function to work.  It
keeps returning a blank value.  I can read the entries separately using
ReadString, but not using ReadSection. Has anyone else experienced this
before? I am using D4.03 and Win95B.

*** Failed code snippet ***
  with TInifile.Create(ChangeFileExt(ParamStr(0), '.INI')) do
  try
    ReadSection('Server', DM.MACData.Params);
  finally
    Free;
  end;
*** End of code snippet ***

TIA,
Mike Gagnon

 

Re:IniFile.ReadSection() problems


Quote
> Seems easy enough, but I cannot get the ReadSection function to work.  It
> keeps returning a blank value.  

I have used it often enough to be able to assure you that it does work. It
fills a Tstrings descendent with the key names in the section. The code
snippet you posted is uninformative. What is DM_MACData.params? Have you
tried it with a simple Tstringlist or a memo.lines?

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads