Page 1 of 1

List of Oracle Homes - will be used by custom logon form

Posted: Sat 03 Apr 2010 06:09
by DuckyDuck
Is it possible to get a list of available Oracle Homes from ODAC ?

I want my allow the user to select from a list of available Oracle Homes in a custom logon form. To do this, I need to first get a list of the Oracle Home

thanks

Environment
Delphi 2009

Posted: Tue 06 Apr 2010 07:13
by bork
You can use the following code to get the list of Oracle Homes:

uses
OraCall;

...


function GetHomeList: TStrings;
var
i: integer;
begin
if not LoadedOCI then
try
DetectOCI; // to show homes info
except
end;

Result := TStringList.Create;
for i := 0 to Length(OracleHomeNames) - 1 do
if OracleHomeNames '' then
Result.Add(OracleHomeNames);
end;