编译器错误消息:CS0234:名称空间“System.Data”中不存在类型或命名空间名称“OracleClient”(您是否缺少程序集引用?) [英] Compiler Error Message: CS0234: The type or namespace name 'OracleClient' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)

查看:494
本文介绍了编译器错误消息:CS0234:名称空间“System.Data”中不存在类型或命名空间名称“OracleClient”(您是否缺少程序集引用?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目上运行'Build'而没有任何错误。然后我运行Debugging,得到

I run 'Build' on my project without any error. Then I run Debugging, and got

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




on

using System.Data.OracleClient;



在我的项目References中,System.Data.OracleClient在列表中。

这里有什么问题?谢谢。


In my project References, System.Data.OracleClient is in the list.
What's wrong here? Thanks.

推荐答案

using Oracle.DataAccess.Client;


您缺少装配参考。什么不清楚?添加参考。在解决方案资源管理器中使用添加引用节有一个单独的程序集System.Data.OracleClient。请参阅任何与Oracle相关的类的文档以查看它,例如: http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oraclecommand%28v=vs.110%29.aspx [ ^ ]。



看起来您尚未准备好进行数据库开发和其他高级主题(UI,网络,几乎没有任何内容)。首先,您需要学习.NET基础知识。特别是

http://msdn.microsoft.com/ en-us / library / ms973231.aspx [ ^ ]。



-SA
You are missing assembly reference. What is unclear? Add reference. Use "Add Reference" node in Solution Explorer. There is a separate assembly "System.Data.OracleClient". See the documentation on any of the Oracle-related classes to see it, for example: http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oraclecommand%28v=vs.110%29.aspx[^].

It looks like you are not yet ready for database development and other advanced topics (UI, network, virtually nothing). First, you need to learn .NET basics. In particular, such things as
http://msdn.microsoft.com/en-us/library/ms973231.aspx[^].

—SA


通过添加引用解决了问题:使用Oracle.DataAccess.Client;

解决方案由Pranav Bilurkar在评论中提出。
Problem solved by adding reference: using Oracle.DataAccess.Client;
The solution was proposed by Pranav Bilurkar in his comment.


这篇关于编译器错误消息:CS0234:名称空间“System.Data”中不存在类型或命名空间名称“OracleClient”(您是否缺少程序集引用?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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