carwashguy
Programmer
Hi,
I'm trying to read from a comma-delimited textfile into a stringlist, using the CommaText property. However when the code is executed I observe the following error:
"Function to be called, TStrings.GetCommaText, was eliminated by linker"
My code is as follows:
************************************************
function TfrmMain.ReadTextFile : boolean;
var
fDataFile: TextFile;
sLineJustRead: string;
aDataList : TStringList;
i : Integer;
begin
aDataList := TStringList.Create;
AssignFile(fDataFile, txtDataFile.Text);
Reset(fDataFile);
While Not SeekEof(fDataFile) Do
begin
Readln(fDataFile, sLineJustRead);
aDataList.CommaText := sLineJustRead;
end;
CloseFile(fDataFile);
end;
************************************************
Any help would be greatly appreciated as this is quite urgent.
Thanks
I'm trying to read from a comma-delimited textfile into a stringlist, using the CommaText property. However when the code is executed I observe the following error:
"Function to be called, TStrings.GetCommaText, was eliminated by linker"
My code is as follows:
************************************************
function TfrmMain.ReadTextFile : boolean;
var
fDataFile: TextFile;
sLineJustRead: string;
aDataList : TStringList;
i : Integer;
begin
aDataList := TStringList.Create;
AssignFile(fDataFile, txtDataFile.Text);
Reset(fDataFile);
While Not SeekEof(fDataFile) Do
begin
Readln(fDataFile, sLineJustRead);
aDataList.CommaText := sLineJustRead;
end;
CloseFile(fDataFile);
end;
************************************************
Any help would be greatly appreciated as this is quite urgent.
Thanks