Hi AlexP,
that didn't worked, but it helped me to figure out the problem. For me it looks like a bug in the new UniDac Release 6.2.9.
I stepped back to 6.1.4 and tried the code
Code: Select all
function Tfrm_intro.getServerlist:TStringlist;
var
Enum: TOraServerEnumerator;
List: TStringList;
s : String;
x : TOraclehome;
begin
OracleHomes.Init;
List := TStringList.Create;
Enum := TOraServerEnumerator.Create;
s := Enum.GetTNSFileName(OracleHomes.Homes[0]);
try
Enum.GetServerList(List);
finally
Enum.Free;
end;
result := List;
end;
With UniDac 6.1.4 Release it worked perfectly. And the Debugger showed:
Oraclehomes.homes[0] =
('OraClient11g_home1', 'C:\app\Image-Benutzer\product\11.1.0\client_1', '', '', '', '', 0, None, False, [])
and
s =
'H:\TNSNAMES\EDV\tnsnames.ora'
the right filename.
but after updating to 6.2.9 the debugging results were:
Oraclehomes.homes[0] =
('OraClient11g_home1', 'C:\app\Image-Benutzer\product\11.1.0\client_1', 'H:\TNSNA', '', '', '', 0, None, False, [])
ans
s was empty.
The
FTNSPath 'H:\TNSNA' is wrong, like you can see in the first testrun.