Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What must I do to get the "System.Data.OracleClient" to be valid in VB.Net in an Imports statement.

105 views
Skip to first unread message

Burt Wilkins

unread,
Jan 28, 2003, 7:44:07 PM1/28/03
to
Dear Authorities:

Thomas Scheidegger, MVP.Net, told me I should ask my question concerning
Installing the .Net Framework Data Provider for Oracle with the "adonet"
newsgroup.

I want to use "OracleCleint" and Oracle data types in my program. I
therefore got "oracle_net.msi", the new .Net Framework Data Provider for
Oarcle install program from the Microsoft Download Center. Since I already
have .Net installed on my development computer, I installed "oracle_net.msi"
and it seemed to work fine. However, then went I try to use this namespace
in a VB.Net application as follows....

Imports System.Data.OracleClient

.... the following build error displays:

Namespace or type 'OracleClient' for the Imports 'System.Data.OracleClient'
cannot be found.

I am wondering what is missing?

I have checked and the file Eula.rtf, Oracleref.chm, Oracleref.chi,
System.Data.OracleClient.dll are all properly within the directory
"D:\Program Files\Microsoft.NET\OracleClient.Net" The Mtxoci8.dll is also
properly within the directory C:\Windows\System32. I used the Global
Assembly Cache tool (Gacutil.exe), and validated using the list option
(gacutil /l) that the OracleClient namespace is in fact listed now as a part
of the global assembly cache. Since I'm developing VB.Net, ADO.Net, and
ASP.Net it follows that I would have to have the minimum requirements of
.NET Framework version 1.0 or better, MDAC 2.7, and I have installed both
Personal Oracle 9i and the Oracle Client on the computer as well.

So having done all these things, why can not the namespace "OracleClient"
be found? What else must I do?

Sincerely,

Burton G. Wilkins


Sushil Chordia

unread,
Jan 28, 2003, 8:32:27 PM1/28/03
to
Hi Burt,

When you compile your program you should add a reference to the
System.Data.OracleClient.dll to your program.
In C# you do it as
csc.exe App.cs /r:System.Data.OracleClient.dll

HTH,
Sushil.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Burt Wilkins" <burton_...@hotmail.com> wrote in message
news:O1MaFAzxCHA.1288@TK2MSFTNGP11...

Andy Baron

unread,
Jan 28, 2003, 8:58:22 PM1/28/03
to
In the Visual Studio Solution Explorer, right click on the References
node under your project, select Add Reference, find the component on
the .NET tab and select it, click the Select button, and click OK.

For the sake of efficiency, you don't automatically get a reference to
every installed framework assembly -- just to a few of most commonly
used ones. You need to explicitly set a reference to any others you
need. The Imports statement doesn't set a reference. It just saves you
some typing by allowing you to leave off the full namespace when you
refer to classes in code.

-- Andy

Burt Wilkins

unread,
Jan 29, 2003, 11:59:28 AM1/29/03
to
Reply. Thank you. You were right. Once the reference was made, the
IMPORTS or OracleClient worked.

"Sushil Chordia" <sus_...@hotmail.com> wrote in message
news:OKU$8YzxCHA.2604@TK2MSFTNGP12...

Burt Wilkins

unread,
Jan 29, 2003, 11:59:49 AM1/29/03
to

Reply. Thank you. You were right. Once the reference was made, the
IMPORTS or OracleClient worked.

"Andy Baron" <Andy_...@msn.com> wrote in message
news:1uce3vo80pqlaukbk...@4ax.com...

0 new messages