类型或命名空间名称'甲骨文'找不到错误 [英] The type or namespace name 'oracle' could not be found error

查看:141
本文介绍了类型或命名空间名称'甲骨文'找不到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立C#控制台应用程序,就可以与数据库,并进行简单的查询。

I am building C# Console Application to connect with database and do simple query.

但是,当我调试的程序,我得到这个错误:

But when I debug program, I get this error:

The type or namespace name 'Oracle' could not be found ( are you missing a using directive or an assembly reference? )

我需要使用:

I need to use:

using Oracle.DataAccess.Client;

我已经从甲骨文网站ODAC包下载。里面我有安装批处理文件(我已经用它),但是仍然没有什么

I have downloaded from Oracle site ODAC pack. Inside I have Install batch file ( i have used it ) but nothing still.

我使用的MS VS2012防爆preSS为Windows桌面。

I am using MS VS2012 Express for Windows Desktop.

添加引用时,我应该包括哪些文件?

What file should I include when adding a reference ?

推荐答案

同意你需要引用:

 Oracle.DataAccess.dll

您可能需要小心,你安装了正确的Oracle客户端 - 如果你有32位之一,那么你可能需要强制你的应用程序到32位模式

You may need to be careful that you have the right Oracle client installed - if you have the 32bit one then you may need to force your app into 32 bit mode.

有关分发,你可能还需要包括所有的依赖在你的BIN文件夹 - 为32位,将是这样的:

For distribution you may also want to include all the dependencies in your BIN folder - for 32bit that would look like :

这篇关于类型或命名空间名称'甲骨文'找不到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆