TnsNames parsing problem / IFILE

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
heidenbluth
Posts: 56
Joined: Mon 08 Nov 2004 19:01
Location: Germany

TnsNames parsing problem / IFILE

Post by heidenbluth » Wed 17 Oct 2018 06:45

Our customer uses a very simple tnsnames.ora containing a single IFILE instruction:
IFILE=//server/share/folder/tnsnames.ora

The referenced tnsnames.ora contains a large number of entries, most using more than one alias.
The first alias is in the first line of the include file, no comment or empty line before!!

The currently implemented parser finds just two aliases: DESCRIPTION and DESCRIPTION_LIST, which is obviously wrong.
I found out the following change helped to fix the problem:

Code: Select all

procedure TOraServerEnumerator.GetServerList(List: TStrings);
...
            if FileExists(FileName) then begin
              IFile.LoadFromFile(FileName);
              for j := IFile.Count - 1 downto 0 do
                F.Insert(i, IFile[j]);
              Code := lcEnd; //hh, 16.10.2018   added to leave the until loop
              Continue;
            end;
          until Code = lcEnd;;
Without the change the repeat-until code is looped again, and the first line of the include file is removed from the copy.
As a result, alias parsing gave odd results.

Please consider to include a fix in the next release.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: TnsNames parsing problem / IFILE

Post by MaximG » Thu 01 Nov 2018 14:16

We fixed the described error. The fix will be included in the next version of our product, the release of which we are planning in the nearest future.

Post Reply