Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem linking to outside dll (oracle client)

Status
Not open for further replies.

gerstens

Programmer
Jul 5, 2002
3
0
0
US
I think this is a pretty general problem, but I'll give all the details I can.


Ok, so I'm making a web app that will do some stuff with an Oracle db sitting on another server. I have the Oracle Client software installed, and the Microsoft .Net Oracle Client. I went out and found a sample web app to make sure that everything was connecting properly. That worked, and I could run queries just fine. The only problem was that it was written in VB Script, which I'm not really familiar with, and it was a pretty big app(for MSSQL,Access,Oracle), so I can't say I understand everything it was doing. I found some C# examples too though, so I figured no problem. Well, of course it failed on the simplest thing. In my code I have:

Code:
using System.Data.OracleClient;

which is the counterpart to the
Code:
Imports System.Data.OracleClient
in the example app, and should give me access to those objects. Instead I get the error:

Code:
Compiler Error Message: CS0234: The type or namespace name 'OracleClient' does not exist in the class or namespace 'System.Data' (are you missing an assembly reference?)

That seems like a pretty simple issue, right? I guess it needs to have access to the Oracle Client dll, but I would think that if it works in the VB app it would work here. What I want to know is what else do I need to do to get it linking correctly? There is a lot more in the VB application, but I can't really find anything that looks like it pertains to this. It does have a dll in its bin directory, but I was under the impression that if the Oracle Client's bin directory is in the PATH environment variable an IIS app should be able to find it. Besides, every example I've found online basically says that if you include the System.Data.OracleClient namespace everything will work.


Thanks,

John Gerstenslager
 
Have you added the reference to the Oracle .NET driver to your project? Right-click on the "references" part of your project and select "Add". Find your Oracle assembly in the list, and add it.

Chip H.
 
Hmm, I'm not using Visual Studio .Net to do this. I have it installed, but I'd rather code everything myself. I'll try what you said though, and see if that makes it work.


Thanks,

John
 
Ok, that worked. Now can anyone explain what it actually did, and how I can do it in a text editor?

John
 
it had worked for me (i use WebMatrix) putting the OracleClient dll into a folder named "bin" inside the application folder of IIS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top