Hello
With ODAC 5.10.2.8, Delphi 7, Oracle 10g there is a small problem when ODAC extracts the alias names from the TNSNames.ora file va the GetOraServerList procedure.
An alias such as :
xxx-aaa-10g.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sss-bbb-ccc)(PORT = 0000))
)
(CONNECT_DATA =
(SERVICE_NAME = xxx)
)
)
becomes xxx-aaa-g.world. If we remove the - before the 10g ie: xxx-aaa10g.world or use xxx-aaa_10g.world then the returned value is correct.
In ODacGui.inc GetOraServerList there is a test on the '-' ,
if (Bracket = 0) and ((Code = lcIdent) or (St = '-')) then
but I'm not sure what the significance is, nor what is going on...
Is there a way to fix this my modifiying the source code ?
Best Regards
Paul
TNSNames.ora alias extraction problem GetOraServerList
Found the problem and a possible solution
Whats hapening is with xxx-aaa-10g.world the parser returns 'xxx' followed by '-' then 'aaa' then '-' then '10' and then 'g' - all parts of the alias are correctly returned by the parser.
When the parser retuns 10 the code is set to lcNumber. The test
if (Bracket = 0) and ((Code = lcIdent) or (St = '-')) then
is not "true" and the parser continues to the g
This gives the result of xxx-aaa-g.world
If I change the test above to :
(Bracket = 0) and ((Code = lcIdent) or (Code = lcNumber) or (St = '-'))
then it evaluates to "true" and the result is correct ie. xxx-aaa-10g.world
Could you please inform as to whether or not the modification I propose will break anything else.
Regards
Paul
When the parser retuns 10 the code is set to lcNumber. The test
if (Bracket = 0) and ((Code = lcIdent) or (St = '-')) then
is not "true" and the parser continues to the g
This gives the result of xxx-aaa-g.world
If I change the test above to :
(Bracket = 0) and ((Code = lcIdent) or (Code = lcNumber) or (St = '-'))
then it evaluates to "true" and the result is correct ie. xxx-aaa-10g.world
Could you please inform as to whether or not the modification I propose will break anything else.
Regards
Paul