Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

INIFILE Win2000 Delphi5

Posted on 2001-07-16
2
Medium Priority
?
579 Views
Last Modified: 2010-04-04
I have :
/////////
 IniFile:TIniFile;
 RepFileChoices : TStrings;
 sTemp:string;
begin
  IniFile:= TIniFile.Create  ('h:u\mbarron\adt_report\ADT_Report.ini');
  RepFileChoices:=TStrings.Create;
  IniFile.ReadSection('Reports',RepFileChoices);// errorline
  sTemp:= RepFileChoices[0];
\\\\\\\\\\\
INIFILE Follows
////////
[Reports]
Main=Yes
TotalTime=Yes
IwTime=No
Function=Yes
\\\\\
I get an error on execution of the next to last
line above. "EAbstractError"
Q1: Is the problem Wn2000?
q2: should I be using Registry? Understand
registry, but do not its usage in Delphi.
0
Comment
Question by:mebarron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Expert Comment

by:egono
ID: 6286764
IniFile:= TIniFile.Create  ('h:u\mbarron\adt_report\ADT_Report.ini');

this line seems to be wrong, maybe you meant:

IniFile:= TIniFile.Create  ('h:\umbarron\adt_report\ADT_Report.ini');


good luck

0
 
LVL 26

Accepted Solution

by:
Russell Libby earned 100 total points
ID: 6286903

The EAbstractError comes from the fact that the TIniFile.ReadSection() ends up calling TStrings.Add, which calls TStrings.GetCount, which is defined as abstract. (in classes.pas)

Use TStringList in place of the TStrings. TStringList has overriden the abstract methods in TStrings.

Russell
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

648 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question