Hi,
I use the System.Data.OleDb.OleDbConnection class to establish a
connection to a Oracle 10G database.
The dsn connection string I use look like this:
dsn=provider="MSDAORA.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
Arne Vajhøj - 04 Jul 2007 02:15 GMT
> I use the System.Data.OleDb.OleDbConnection class to establish a
> connection to a Oracle 10G database.
[quoted text clipped - 18 lines]
> 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/archive/index.php/t-6705.html
Arne
PS: Why not use an Oracle ADO.NET provider instead of OLE DB ?
kimtherkelsen@gmail.com - 04 Jul 2007 06:27 GMT
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.dk> wrote:
> kimtherkel...@gmail.com wrote:
> > I use the System.Data.OleDb.OleDbConnection class to establish a
[quoted text clipped - 33 lines]
>
> PS: Why not use an Oracle ADO.NET provider instead of OLE DB ?
Arne Vajhøj - 04 Jul 2007 16:11 GMT
> 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
[quoted text clipped - 7 lines]
> 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
Christof Nordiek - 04 Jul 2007 09:56 GMT
> Hi,
> I use the System.Data.OleDb.OleDbConnection class to establish a
[quoted text clipped - 9 lines]
>
> 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
kimtherkelsen@gmail.com - 04 Jul 2007 11:55 GMT
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
> <kimtherkel...@gmail.com> schrieb im Newsbeitragnews:1183493434.971909.276420@n60g2000hse.googlegroups.com...
>
[quoted text clipped - 16 lines]
>
> Christof