OracleClient connection string problem in V1.1

J

John Colaizzi

I've installed the V1.1 framework and things have stopped working.
Basically I can no longer get a connection to our Oracle 8.1.7 server with
the 8.1.7 client software installed. It all worked fine with V1.0.

If I use the same connection string in V1.1 that worked in V1.0
strConn = "Data Source=server;User ID=myUid;Password=myPW;";
I get an unhandled exception with additional info of "Invalid PInvoke
metadata format."

If I add the integrated security keyword
strConn = "Data Source=server;User ID=myUid;Password=myPW;Integrated
Security=yes";
I get a handled exception with the message
"ORA-01004: default username feature not supported; logon denied."

My SQLNET.ORA has sqlnet.authentication_services = NONE.

Reading the MS docs it says it's recommended to not use User ID and
Password.

It seems like it's ignoring the UID/PW combination I'm giving it and trying
to do a default logon.

I'm confused. Anyone out there know how to make this work?

John
 
C

Carlos J. Quintero

One cause for this is that you have an assembly compiled for .Net Framework
1.0, running against .Net Framework 1.0 but that somehow is loading the 1.1
version of the Microsoft .Net Data Provider for Oracle, which can not be
executed from 1.0 code because of that exception.

I saw this scenario loading dynamically the .Net Data Provider from a 1.0
assembly without taking into account versions. After I installed 1.1 .Net
framework, I got that exception because the same code 1.0 now loaded 1.1
version of the provider. There are some posts from me and Angel (Microsoft)
about it in this group (use Google).

Yours must be this or a variation of this scenario.

HTH,

Carlos Quintero
 
J

John Colaizzi

Carlos,

Thanks for you response. I saw your excellant post and the response from
Angel
prior to posting. I'm still rather new to C# so I might have not understood
all that
you two were talking about.

In Solution Explorer I have a reference for System, System.Data
and System.Data.OracleClient. When I look at the properties for each of them
the
version number is 1.0.5000.0. Then in the module I have a using statement
for
each of them. I believe these are all the 1.1 framework modules, which are
the
ones I want to use.

Am I missing a step that tells the IDE that I want to use the 1.1 framework?

Thanks
John
 
C

Carlos J. Quintero

If you are using VS.Net 2002, you can not develop against .Net Framework
1.1, you should use .Net Framework 1.0 references (1.0.3300.0). This maybe
your problem.

Note that:

- 1.0.3300.0 is .Net Framework 1.0 and despite the misleading numbering
1.0.5000.0 is .Net Framework 1.1. These are assembly versions, not file
versions, which are different concepts. Assembly versions are seen in the
Assembly cache (C:\WINNT\assembly folder) while file versions are seen with
the Windows Explorer, in the properties dialog of a file, Version tab. For
example, while the assembly version of System.Data.OracleClient.dll in .Net
Framework 1.1 is 1.0.5000.0, its file version
(C:\WINNT\Microsoft.NET\Framework\v1.1.4322 folder) is 1.1.4322.573.

- The assembly compiled with VS.Net 2002 and .Net Framework 1.0 can run
later on .Net Framework 1.1 if you choose so, through a config file. See the
docs.

- To develop against .Net Framework 1.1, you need VS.Net 2003

Carlos Quintero


In Solution Explorer I have a reference for System, System.Data
and System.Data.OracleClient. When I look at the properties for each of them
the
version number is 1.0.5000.0. Then in the module I have a using statement
for
each of them. I believe these are all the 1.1 framework modules, which are
the
ones I want to use.

Am I missing a step that tells the IDE that I want to use the 1.1
framework?
 

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