473,788 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble connecting to Oracle database from C#

Hi,
I use the System.Data.Ole Db.OleDbConnect ion class to establish a
connection to a Oracle 10G database.
The dsn connection string I use look like this:

dsn=provider="M SDAORA.1";User ID=test;Data Source="172.30. 0.25/
JBOS";Password= test;

This works fine in Windows XP and Windows server 2003 but I have a
customer that try to connect to the database from a Windows 2000
machine and gets the following error:

ORA-06401: NETCMN: Invalid driver designator

I have tried to reproduce the error on a VMWARE Windows 2000 sp4
machine (that does not have a Oracle server or client installed) but
there it works after installing MDAC version 2.8. I am not able to
reproduce the error...

Do you have any idea what is wrong?

I include the the following DLL files with the code:
oraociei10.dll, oci.dll, oraocci10.dll, ociw32.dll, orannzsbb10.dll

Best regards,
Kim Therkelsen

Jul 3 '07 #1
5 8411
ki***********@g mail.com wrote:
I use the System.Data.Ole Db.OleDbConnect ion class to establish a
connection to a Oracle 10G database.
The dsn connection string I use look like this:

dsn=provider="M SDAORA.1";User ID=test;Data Source="172.30. 0.25/
JBOS";Password= test;

This works fine in Windows XP and Windows server 2003 but I have a
customer that try to connect to the database from a Windows 2000
machine and gets the following error:

ORA-06401: NETCMN: Invalid driver designator

I have tried to reproduce the error on a VMWARE Windows 2000 sp4
machine (that does not have a Oracle server or client installed) but
there it works after installing MDAC version 2.8. I am not able to
reproduce the error...

Do you have any idea what is wrong?

I include the the following DLL files with the code:
oraociei10.dll, oci.dll, oraocci10.dll, ociw32.dll, orannzsbb10.dll
A googling finds a lot of references to this problem.

Many of them indicate a mismatch between connection string
and tnsnames.ora.

So you should check that.

An interesting twist is:
http://www.phpbuilder.com/board/arch...hp/t-6705.html

Arne

PS: Why not use an Oracle ADO.NET provider instead of OLE DB ?
Jul 4 '07 #2
Hi!

As I wrote, I do not intend to install a Oracle client on the PCs if I
can avoid it. So there is no tnsnames.ora file on the machine. The
application uses the included dlls. If I use the exact same settings
on my test w2k machine without Oracle client or server installed, it
works. I think it perhaps would work if I also installed a Oracle
client on all the machines and then used the tnsname in the connection
string but that is a lot of work and a lot of software for such a
simple task.

Actually I did not write the code myself but if it makes things easier
to use Oracle ADO.NET instead of OLE DB, I will change it.

/Kim
On 4 Jul., 03:15, Arne Vajhøj <a...@vajhoej.d kwrote:
kimtherkel...@g mail.com wrote:
I use the System.Data.Ole Db.OleDbConnect ion class to establish a
connection to a Oracle 10G database.
The dsn connection string I use look like this:
dsn=provider="M SDAORA.1";User ID=test;Data Source="172.30. 0.25/
JBOS";Password= test;
This works fine in Windows XP and Windows server 2003 but I have a
customer that try to connect to the database from a Windows 2000
machine and gets the following error:
ORA-06401: NETCMN: Invalid driver designator
I have tried to reproduce the error on a VMWARE Windows 2000 sp4
machine (that does not have a Oracle server or client installed) but
there it works after installing MDAC version 2.8. I am not able to
reproduce the error...
Do you have any idea what is wrong?
I include the the following DLL files with the code:
oraociei10.dll, oci.dll, oraocci10.dll, ociw32.dll, orannzsbb10.dll

A googling finds a lot of references to this problem.

Many of them indicate a mismatch between connection string
and tnsnames.ora.

So you should check that.

An interesting twist is:
http://www.phpbuilder.com/board/arch...hp/t-6705.html

Arne

PS: Why not use an Oracle ADO.NET provider instead of OLE DB ?

Jul 4 '07 #3
<ki***********@ gmail.comschrie b im Newsbeitrag
news:11******** **************@ n60g2000hse.goo glegroups.com.. .
Hi,
I use the System.Data.Ole Db.OleDbConnect ion class to establish a
connection to a Oracle 10G database.
The dsn connection string I use look like this:

dsn=provider="M SDAORA.1";User ID=test;Data Source="172.30. 0.25/
JBOS";Password= test;

This works fine in Windows XP and Windows server 2003 but I have a
customer that try to connect to the database from a Windows 2000
machine and gets the following error:

ORA-06401: NETCMN: Invalid driver designator
This is a error message from Oracle. Since OLEDB is not C# specific. I
suppose you should ask this in an Oracle group.

Christof
Jul 4 '07 #4

We solved the problem!

A ORACLE_HOME environment path had to be set to point at the folder
containing the dlls. Otherwise this specific PC would look for the
libraries in other places because it previously had a Oracle 9i client
installed.

Best regards,
Kim Therkelsen

On 4 Jul., 10:56, "Christof Nordiek" <c...@nospam.de wrote:
<kimtherkel...@ gmail.comschrie b im Newsbeitragnews :11************ **********@n60g 2000hse.googleg roups.com...
Hi,
I use the System.Data.Ole Db.OleDbConnect ion class to establish a
connection to a Oracle 10G database.
The dsn connection string I use look like this:
dsn=provider="M SDAORA.1";User ID=test;Data Source="172.30. 0.25/
JBOS";Password= test;
This works fine in Windows XP and Windows server 2003 but I have a
customer that try to connect to the database from a Windows 2000
machine and gets the following error:
ORA-06401: NETCMN: Invalid driver designator

This is a error message from Oracle. Since OLEDB is not C# specific. I
suppose you should ask this in an Oracle group.

Christof

Jul 4 '07 #5
ki***********@g mail.com wrote:
As I wrote, I do not intend to install a Oracle client on the PCs if I
can avoid it. So there is no tnsnames.ora file on the machine. The
application uses the included dlls. If I use the exact same settings
on my test w2k machine without Oracle client or server installed, it
works. I think it perhaps would work if I also installed a Oracle
client on all the machines and then used the tnsname in the connection
string but that is a lot of work and a lot of software for such a
simple task.

Actually I did not write the code myself but if it makes things easier
to use Oracle ADO.NET instead of OLE DB, I will change it.
I believe that all Oracle only supports solutions with
Oracle client installed on PC's (except for Java JDBC thin
driver, which is probably not so relevant for you).

Arne
Jul 4 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1758
by: yahibble | last post by:
Now, I am no Python expert but I have dabbled and I have spent a couple of days with another engineer unsuccessfully installing oracle drivers for MS ODBC on the win XP machine. It looked to me like ODBC was the best way to get a (free) python module to upload data to an oracle database table. Aside from installing oracle clients to ODBC being a pain, I would like to consider other ways to connect. Has anyone had experiences with...
2
4993
by: tim.pascoe | last post by:
I'm currently trying to establish a linked server to an Oracle database. Setup: Connecting to 8x version of Oracle Using 9i client tools (Net Manager) SQL-Server 2000 Windows 2000 I installed the Oracle 9i client tools, and set up a Service for the
2
3463
by: python_eager | last post by:
Hi i am connecting my database oracle 9i. While connecting i am getting the following error connection = cx_Oracle.connect("myusername", "mypassword", "python") RuntimeError: Unable to acquire Oracle environment handle please send the solution
3
1346
by: jens Jensen | last post by:
exception: "System.Data.OracleClient requires Oracle client software version 8.1.7 or greater." fails at connection.Open();
0
1638
by: antonyliu2002 | last post by:
I am having a hard time connecting to an oracle database from within Visual Web Developer (VWD) 2005 Express Edition. Check out the screen snap shot here: http://static.flickr.com/97/241874792_aebbadac2b_o.gif Here is the situation: 1. The oracle database runs on Machine A.
2
5536
by: rcc.gamer | last post by:
Hello All, I am trying to connect a GridView to an Oracle table using the standard SqlDataSource. The process is fairly simple and there are detailed instructions from Microsoft ... http://msdn2.microsoft.com/en-us/library/ms178304(vs.80).aspx The problem is not accessing or displaying data from an Oracle table .... that all works great!
0
2721
by: piyushdabomb | last post by:
Hi Oracle Gurus!! Before I proceed, as per the moderators request, I would like to mention that I have already taken a look at the other threads pertaining to a similar issue which I am having and have not found a feasible answer. I would like to apologize if there is an answer out there (I've looked at quite a few threads). So here is the situation: Currently, I have been using Oracle Toad from Quest Software to connect to the...
7
2003
by: cyberbilly1 | last post by:
Hi All! I'm trying to connect to a remote oracle database using the OracleConnection within VB.net . Whenever I try connecting I get a SocketException:No connection could be made because the target machine actively refused it. error. Currently my connectionstring is as follows: OracleConnection1.ConnectionString =...
1
1812
by: kinnu | last post by:
hi, could any one help me with the steps of connecting the vb form with the oracle database/table. I could connect vb to access. as my collage project requires connecting of vb with oracle database/table please help me with the steps. Thanks.
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.