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,
OracleDataSourceEnumerator Bug
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: OracleDataSourceEnumerator Bug
We have reproduced the issue. We will investigate it and post here about the results as soon as possible.
Re: OracleDataSourceEnumerator Bug
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,
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,
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: OracleDataSourceEnumerator Bug
We have answered you via e-mail.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: OracleDataSourceEnumerator Bug
We have improved the OracleHomeCollection class. We will post here when the corresponding build of dotConnect for Oracle is available for download.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: OracleDataSourceEnumerator Bug
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
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