OracleConnection error

G

Guest

Hi;

I am trying to open an OracleConnection with the connection string:
Data Source=Aristotle.jfcom.mil:1526/DEV;Persist Security Info=True;User
ID=jam_user;Password=grapes

And getting:
open failed: System.Data.OracleClient.OracleException: ORA-06401:
NETCMN: invalid driver designator

at System.Data.OracleClient.OracleException.Check(OciErrorHandle
errorHandle,
Int32 rc)
at
System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction
(S
tring userName, String password, String serverName, Boolean
integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
at
System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnection
St
ring connectionOptions)
at
System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConn
ec
tionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConn ection owningObject)
at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbCo
nn
ection owningConnection, DbConnectionPool pool, DbConnectionOptions
options)
at
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owning
Object)
at
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
o
wningObject)
at
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
ownin
gObject)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
ow
ningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
ou
terConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at TestOracle.TestOracle.Main() in
C:\src\DBConnTest\TestOracle\TestOracle.cs
:line 30

Any ideas?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
F

Frans Bouma [C# MVP]

David said:
Hi;

I am trying to open an OracleConnection with the connection string:
Data Source=Aristotle.jfcom.mil:1526/DEV;Persist Security
Info=True;User ID=jam_user;Password=grapes

And getting:
open failed: System.Data.OracleClient.OracleException: ORA-06401:
NETCMN: invalid driver designator

at System.Data.OracleClient.OracleException.Check(OciErrorHandle
errorHandle,
Int32 rc)
at
System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransacti
on (S
tring userName, String password, String serverName, Boolean
integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
at
System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnecti
on St
ring connectionOptions)
at
System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbCo
nn ec
tionOptions options, Object poolGroupProviderInfo, DbConnectionPool
pool, DbConn ection owningObject)
at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(Db
Co nn
ection owningConnection, DbConnectionPool pool, DbConnectionOptions
options)
at
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owning
Object)
at
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnecti
on o
wningObject)
at
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
ownin
gObject)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnectio
n ow
ningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnectio
n ou
terConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at TestOracle.TestOracle.Main() in
C:\src\DBConnTest\TestOracle\TestOracle.cs
:line 30

Any ideas?

First of all, this newsgroup is public, so posting a connection
string with server name inside a militairy domain + username/password
isn't that clever.

Second, the MS oracle provider requires a client which is at least 8i.
Do you have that client installed or do you have an older client?

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
F

Frans Bouma [C# MVP]

David said:
1. It's a dev box behind a firewall but yes, you're right. Changed it.

2. We have 10g. But I have tested the OracleConnection on machines
with no Oracle client and it works so is that really a requirement if
TNS is not being used?

Yes, a client is required. It surprises me you were able to use
oracle on a machine without the oracle client installed, as the ms
oracle provider (similar to ODP.NET) simply talks to OCI.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
W

WenYuan Wang

Hi Dave,

Just want to check if the issue has been resolved?
If it still persists, please don't hesitate to update here.
We'll go on to assist you on it. Thanks.

Have a great day!
Best Regards,
Wen Yuan
 
W

WenYuan Wang

Hi Dave,

This error generally means there's something wrong with the information
referenced by the "Data Source" keyword in the connection string. Most
likely there is a problem with that configuration. Have you connected from
the same client machine using SQL*Plus with that same data source, user id,
and password? If it works fine with "SQL*Plus", there must be something
wrong with code, otherwise, there is a problem with the configuration.

Have a great day!
Best regards,
Wen Yuan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top