TOraServerEnumerator.GetServerList() does not account for commented entries

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rburgstaler
Posts: 4
Joined: Mon 12 Jan 2009 16:44

TOraServerEnumerator.GetServerList() does not account for commented entries

Post by rburgstaler » Mon 16 Jun 2014 17:17

I have a tnsnames.ora file that has an ifile declaration commented out (#) in the file. The problem is that the ifile declares the same tnsnames.ora file as the file. When TOraServerEnumerator.GetServerList() in OraServices.pas is called it ends up looking in tnsnames.ora for the ifile declaration which then finds and opens up the same file and looks for the ifile declaration over and over again which turns out being an infinite loop.

It would be nice if TOraServerEnumerator.GetServerList() could be improved to be smart enough to check for commented entries when looking for the ifile. It would also be nice if there was also some logic that checked for infinite loops in the ifile lookup logic.

I realize that this can be worked around by removing the ifile declaration or replacing ifile with i#file or something like that however, the symptom for me to realize that this was occurring was that our application was locking up without any indication as to why it was locked up.


This is the the tnsnames.ora file located at "C:\Work\SQLOracle\tnsnames.ora"

Code: Select all

# The following i file declaration is commented out
# ifile=C:\Work\SQLOracle\tnsnames.ora
DESIGNOPS_WORKSTUD = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = designops                        )(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = WORKSTUD ) ) )
I just wanted to make you aware of what I would consider a bug.
Thanks

Rick

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TOraServerEnumerator.GetServerList() does not account for commented entries

Post by AlexP » Tue 17 Jun 2014 09:23

Hello,

Thank you for the information. We have reproduced and fixed the problem. This fix will be included to the next build.

rburgstaler
Posts: 4
Joined: Mon 12 Jan 2009 16:44

Re: TOraServerEnumerator.GetServerList() does not account for commented entries

Post by rburgstaler » Tue 17 Jun 2014 15:10

Nice!

Impressive turn around on this!

Thanks,
Rick

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TOraServerEnumerator.GetServerList() does not account for commented entries

Post by AlexP » Wed 18 Jun 2014 08:37

If any other questions come up, please contact us.

Post Reply