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

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DuckyDuck
Posts: 16
Joined: Mon 06 Apr 2009 07:58

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

Post by DuckyDuck » Sat 03 Apr 2010 06:09

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

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 06 Apr 2010 07:13

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;

Post Reply