OracleDataSourceEnumerator Bug

OracleDataSourceEnumerator Bug

Postby adsivlad » Tue 27 Oct 2015 14:21

Hello,
I am trying to read the tnsnames.ora entries using the following code copied from the example on your website:
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"]);
}
}

The problem is that every column in the DataTable is empty except InstanceName. I have tested if I can connect with the alias and it works. Also, using ODP.NET I am able to see the entries in full detail. The code for ODP.NET to read tnsnames.ora entries is the following:

string ProviderName = "Oracle.DataAccess.Client";
DbProviderFactory factory = DbProviderFactories.GetFactory(ProviderName);
if (factory.CanCreateDataSourceEnumerator)
{
DbDataSourceEnumerator dsenum = factory.CreateDataSourceEnumerator();
DataTable dt = dsenum.GetDataSources();
foreach (DataRow row in dt.Rows)
{
System.Diagnostics.Debug.Print(dt.Columns[0] + " : " + row[0]);
System.Diagnostics.Debug.Print(dt.Columns[1] + " : " + row[1]);
System.Diagnostics.Debug.Print(dt.Columns[2] + " : " + row[2]);
System.Diagnostics.Debug.Print(dt.Columns[3] + " : " + row[3]);
System.Diagnostics.Debug.Print(dt.Columns[4] + " : " + row[4]);
System.Diagnostics.Debug.Print("--------------------");
}
}
else
Console.Write("Data source enumeration is not supported by provider");

Can you help me by answering this blocking issue?

We have dotConnect 8.3.135.0

We use Oracle 11g

Thanks,
adsivlad
 
Posts: 9
Joined: Tue 18 Mar 2014 10:38

Re: OracleDataSourceEnumerator Bug

Postby Pinturiccio » Thu 29 Oct 2015 15:15

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1891
Joined: Wed 02 Nov 2011 09:44

Re: OracleDataSourceEnumerator Bug

Postby adsivlad » Thu 12 Nov 2015 15:20

Any news for the issue?
It's been 2 weeks and there is no answer from your side.

The issue is urgent for us as we want to change a C# function that uses OracleLoader to direct mode.
But given the fact that direct mode uses a different connection string we need to parse the TNSNames.ORA to scan for TNS also if the user uses TNS.
That is why it is very important for us to be able to get the TNS aliases from the file.

Thanks,
adsivlad
 
Posts: 9
Joined: Tue 18 Mar 2014 10:38

Re: OracleDataSourceEnumerator Bug

Postby Pinturiccio » Fri 13 Nov 2015 14:40

We have answered you via e-mail.
Pinturiccio
Devart Team
 
Posts: 1891
Joined: Wed 02 Nov 2011 09:44

Re: OracleDataSourceEnumerator Bug

Postby Pinturiccio » Wed 04 May 2016 13:37

We have improved the OracleHomeCollection class. We will post here when the corresponding build of dotConnect for Oracle is available for download.
Pinturiccio
Devart Team
 
Posts: 1891
Joined: Wed 02 Nov 2011 09:44

Re: OracleDataSourceEnumerator Bug

Postby Pinturiccio » Fri 06 May 2016 07:57

New build of dotConnect for Oracle 9.0.12 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=33635
Pinturiccio
Devart Team
 
Posts: 1891
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle