Page 1 of 1

System.Data.EntityException while query

Posted: Thu 16 Jul 2009 15:04
by anilrawat
Hi,

I am evaluating dotConnect oracle provider for my project with Oracle 9i (ver 9.2.0.8) and Oracle 10g.

I have tested code with Oracle 10 and 9i. The code works fine with Oracle 10g and when I change connection string from connecting to Oralce 9i then i get exception :

System.Data.EntityException] = {"The underlying provider failed on Open."}

I get this exception while executing query.
Can you help me to understand what is the issue.

I am pasting connection string I am using:
Connection string inside app.config which was generated while generating entity model from database.
Oracle 10g:
public static string getConStrIntegrated()
{

string conStrIntegratedSecurity = new System.Data.EntityClient.EntityConnectionStringBuilder
{
Metadata = "res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl",
Provider = "Devart.Data.Oracle",
//Provider = "DDTek.Oracle",
ProviderConnectionString = new System.Data.SqlClient.SqlConnectionStringBuilder
{
// User Id=hr;Password=manager;Server=XE;Persist Security Info=True
//InitialCatalog = "Northwind",
DataSource = "XE",
UserID = "hr",
Password = "manager",
}.ConnectionString
}.ConnectionString;

return conStrIntegratedSecurity;
}

and Oracle 9i:
public static string getConStrIntegrated()
{

string conStrIntegratedSecurity = new System.Data.EntityClient.EntityConnectionStringBuilder
{
Metadata = "res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl",
Provider = "Devart.Data.Oracle",
//Provider = "DDTek.Oracle",
ProviderConnectionString = new System.Data.SqlClient.SqlConnectionStringBuilder
{
// User Id=hr;Password=manager;Server=XE;Persist Security Info=True
//InitialCatalog = "Northwind",
DataSource = "ANIL",
UserID = "hr",
Password = "manager",
}.ConnectionString
}.ConnectionString;

return conStrIntegratedSecurity;
}

Code works with Oracle 10g but same code doesn't work with Oracle 9i.

Can you please help in this I need to decide provider for the project.?

Do you have any phone number where i can reach out for further queries?

Thanks,
Anil

Posted: Fri 17 Jul 2009 11:53
by AndreyR
Could you please post here the InnerException property and InnerException Call Stack?
The "The underlying provider failed on Open." error is only a wrapper for database-level errors, so we need a more detailed description.

Posted: Tue 21 Jul 2009 10:01
by anilrawat
Hi,

This exception is wrapped by dotConnect provider, I am not sure if I can get inner exception. I will try if I get and send you details.

I need to goto client site to connect with oracle and see the exception. Is there any phone where I can contact you as soon as I get error? Otherwise it may time to resolve this issue.
Thanks,
Anil

Posted: Tue 21 Jul 2009 12:27
by AndreyR
Sorry, we do not offer phone support.

Posted: Tue 21 Jul 2009 13:57
by anilrawat
ok, thanks.

Do you offer phone support after we purchase license? or phone support is not offered even after purchasing license?

And is there any phone where I can contact for purchasing license?

Do you have any customer who is using orcalce provider with oracle 9i?

Thanks,
Anil

Posted: Tue 21 Jul 2009 14:18
by AndreyR
We do not offer phone support for both registered and unregistered users.
Please ask the questions regarding purchasing at sales * devart * com.
As for Oracle 9i users, you can find a significant number of them at our forum.

Posted: Tue 21 Jul 2009 15:05
by anilrawat
Do I need to install Oracle 9i client on machine from where I am trying to connect oracle 9i server?

I have oracle 9i installed on different maching, and .net application and provider are installed on my laptop, from where I am trying to connect to oracle 9i which is on another machine. I have oracle 10g also installed on laptop where I am using .net application.

Is there anything to do with oracle client?

Thanks,
Anil

Posted: Wed 22 Jul 2009 06:29
by AndreyR
You can use Direct mode of dotConnect for Oracle and there will be no need to install Oracle Client.
But please be aware about some limitations of the Direct mode, you can find the list of advantages and limitations here:
http://www.devart.com/dotconnect/oracle ... tMode.html
You can also install the Oracle client and use it, if any limitations are critical for you.

Posted: Wed 22 Jul 2009 13:16
by anilrawat
Hi,

Find below innderException:

[Devart.Data.Oracle.OracleException] = {"ORA-12154: TNS:could not resolve the connect identifier specified"}

Thanks,
Anil

Posted: Wed 22 Jul 2009 13:43
by anilrawat
Hi,

I got this resolved myself.

SERVICE_NAME was changed to SID.

Thanks,
Anil