How get oracle home list?
How get oracle home list?
How I can get oracle home list?
Re: How get oracle home list?
You can use the following code
The variables are defined in the OraCalls unit.
Regards
Jens
Code: Select all
for i := 0 to OracleHomeCount - 1 do
Items.Add(OracleHomeNames[i]);
Regards
Jens
Re: How get oracle home list?
How I can set selected oracle home from combobox into OraSession?
Re: How get oracle home list?
hello,
The name Oracle Home is set in the OraSession1.HomeName property:
OraSession1.HomeName := ComboBox1.Items[ComboBox1.ItemIndex];
The name Oracle Home is set in the OraSession1.HomeName property:
OraSession1.HomeName := ComboBox1.Items[ComboBox1.ItemIndex];
Re: How get oracle home list?
I get TNS file name like this
but this is current TNS file name, how I can get TNS file name selected from combobox (ComboBox1.Items[ComboBox1.ItemIndex])?
Code: Select all
var
tnsPath : String;
t : TOraServerEnumerator;
begin
t := TOraServerEnumerator.Create;
try
tnsPath := t.GetTNSFileName;
finally
t.free;
end;
end;Re: How get oracle home list?
hello,
The GetTNSFileName method returns the name and path to the tnsnames.ora file, that corresponds tothe selected value of Home.
The OraSession dialog is a design-time component, and in the selected ComboBox HomeName is set to the TOraSession.HomeName property, from that you can retrieve the name of the current Home in run-time.
in run-time you will always get the HomeName that was set in the OraSession dialog in design-time, if it wasn't changed and is correct (such HomeName exists and registerred on the current PC), if the selected HomeName doesn't exist, the default HomeName will be used.
The GetTNSFileName method returns the name and path to the tnsnames.ora file, that corresponds tothe selected value of Home.
The OraSession dialog is a design-time component, and in the selected ComboBox HomeName is set to the TOraSession.HomeName property, from that you can retrieve the name of the current Home in run-time.
but this is current TNS file name, how I can get TNS file name selected from combobox
in run-time you will always get the HomeName that was set in the OraSession dialog in design-time, if it wasn't changed and is correct (such HomeName exists and registerred on the current PC), if the selected HomeName doesn't exist, the default HomeName will be used.
Re: How get oracle home list?
Try to ask another.
In my ComboBox1 (OracleHomeNames) 5 values. How I can show all 5 tnsnames.ora file paths?
In my ComboBox1 (OracleHomeNames) 5 values. How I can show all 5 tnsnames.ora file paths?
Re: How get oracle home list?
Hello,
To retrieve all paths to the installed Oracle clients, you can use the following code:
Moreover, you can retrieve all the information about Oracle clients from the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ registry branch even with no using of our components.
To retrieve all paths to the installed Oracle clients, you can use the following code:
Code: Select all
try
DetectOCI;
except
end;
for i := 0 to OracleHomeCount - 1 do
ShowMessage(OracleHomePaths);