Hi all,
does anyone here have an idea how to obtain a list of Oracle Database descriptors from LDAP, just like TOAD does in the New Connection dialog?
miwi
Enumerate Oracle servers via LDAP
Please try the following:
Server Explorer > Connect to Database > Oracle Database (dotConnect for Oracle) --> there are database descriptors in the Server combobox on the Add Connection form.
Design-time features (DDEX), including component editors and property editors, are not available in Express Edition: http://www.devart.com/dotconnect/oracle/editions.html.
Server Explorer > Connect to Database > Oracle Database (dotConnect for Oracle) --> there are database descriptors in the Server combobox on the Add Connection form.
Design-time features (DDEX), including component editors and property editors, are not available in Express Edition: http://www.devart.com/dotconnect/oracle/editions.html.
Uhm, sorry for the inaccuracy, but what I meant was how to get such a list at runtime.Shalex wrote:Please try the following:
Server Explorer > Connect to Database > Oracle Database (dotConnect for Oracle) --> there are database descriptors in the Server combobox on the Add Connection form.
In my product here, the customer is able to select a database connection to read (import) data from. This works for connections in tnsnames.ora, but we want to support LDAP, too.
miwi
1. You can obtain a list of Oracle Database descriptors from all tnsnames.ora files in runtime using the OracleConnection.Homes property and the OracleDataSourceEnumerator.GetDataSources() method:
2. dotConnect for Oracle does not support LDAP. We will investigate the possibility of implementing this feature and post here the results. But we can not provide any timeframe at the moment.
Code: Select all
OracleHomeCollection homes = OracleConnection.Homes;
foreach (OracleHome h in homes) {
Console.WriteLine("=== Home={0} ===", h.Name);
OracleDataSourceEnumerator en = new OracleDataSourceEnumerator();
DataTable tbl = en.GetDataSources(h.Name);
foreach (DataRow row in tbl.Rows) {
Console.WriteLine(row["InstanceName"]);
}
}