Import Namespace="System.Data.OracleClient"出错

arefe 2003-06-15 04:06:34
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

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?)

Source Error:



Line 1: <%@ Import Namespace="System.Data" %>
Line 2: <%@ Import Namespace="System.Data.OracleClient" %>
Line 3:
Line 4: <html>

如何解决??
...全文
194 21 打赏 收藏 转发到动态 举报
写回复
用AI写文章
21 条回复
切换为时间正序
请发表友善的回复…
发表回复
arefe 2003-06-16
  • 打赏
  • 举报
回复
.........
greystar 2003-06-15
  • 打赏
  • 举报
回复
所有的工作都是在服务器上完成的。这个问题有点怪,我要试一下,是不是这种结果。
2003
arefe 2003-06-15
  • 打赏
  • 举报
回复
ArLi2003(阿利 风雨中的无爪飞龙):
“你要知道,ASPX是运行在别的计算机上”,这句话好像不对吧?aspx是运行在服务器上啊
arefe 2003-06-15
  • 打赏
  • 举报
回复
ArLi2003(阿利 风雨中的无爪飞龙):
ASPX中如何添加dll?我就是不会这个呀!!
ArLi2003 2003-06-15
  • 打赏
  • 举报
回复
呵呵,并非所有的类在ASPX上都可用,你还必须使用<%Assembly

你要知道,ASPX是运行在别的计算机上,你以保证该机上都装有完整的VS lib 吗?所以ASPX只允许精简包的.net framework 类库

比如我原来使用Import Microsoft.VisualBasic 就不行。。而使用code 绑定做DLL 是可以的,建议楼主做成DLL算了。或者使用ODBC 驱动oracle 库
arefe 2003-06-15
  • 打赏
  • 举报
回复
greystar(greystar):
还没有搞定,不过谢谢你了:)
明天再继续
arefe 2003-06-15
  • 打赏
  • 举报
回复
我自己在学习:)就我自己做
greystar 2003-06-15
  • 打赏
  • 举报
回复
我不相这种东东在安装时没有注册的。那这个工程是你自己开始做的吗。
还是别人的,你在里面调试
arefe 2003-06-15
  • 打赏
  • 举报
回复
<%@ Page Language="C#" Debug="true" %>
这个我加上了,不行的。
关键是
The 'OraOLEDB.Oracle' provider is not registered on the local machine.
没有注册,怎么注册呢?

还是这个问题。
greystar 2003-06-15
  • 打赏
  • 举报
回复
是你的WEB应用程序配置文件,每个工程都有的。在工程的最外层,你找一下。
只要修改一下就可以了。
应该不是你自己建的工程吧,不然不会出现这种问题的。
greystar 2003-06-15
  • 打赏
  • 举报
回复
1)Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>


greystar 2003-06-15
  • 打赏
  • 举报
回复
那就是你的这个问题了。
你在类里是没有这个问题的。但是在WEB页里就是要这个东东的。
在你工程文件里。最外层有这样一个文件。
一定是Debug=false
arefe 2003-06-15
  • 打赏
  • 举报
回复
web.config??
我才开始学asp.net,我不知道这个东西,请告诉我怎么弄,谢谢!!
greystar 2003-06-15
  • 打赏
  • 举报
回复
这可是给晕了。不会这些东东在安装的时候不注册的吧。
是不是还要添加引用。可是应该是全局调用的啊

我看是不是你的web.config有问题,里面的debug设为真看看呢
arefe 2003-06-15
  • 打赏
  • 举报
回复
The 'OraOLEDB.Oracle' provider is not registered on the local machine.
没有注册,怎么注册呢?
arefe 2003-06-15
  • 打赏
  • 举报
回复
我用System.Data.OleDb也出错了。
No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[OleDbException (0x80040154): No error information available: REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'OraOLEDB.Oracle' provider is not registered on the local machine.]
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +83
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
ASP.datagrid1_OLE_aspx.Page_Load(Object sender, EventArgs e) +94
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
greystar 2003-06-15
  • 打赏
  • 举报
回复
那不好意思。我装是装了。2003,
不过现在也一直没有用过。打扰你了。
帮你问问
arefe 2003-06-15
  • 打赏
  • 举报
回复
我的是.NET是1.1版本的,已经包含System.Data.OracleClient了。
arefe 2003-06-15
  • 打赏
  • 举报
回复
我当然知道System.Data.OleDb可以,但是System.Data.OracleClient也应该可以的。我在单独的cs文件中可以编译成功(/r:System.Data.Oracleclient.dll),但不知道在IIS中如何做??
greystar 2003-06-15
  • 打赏
  • 举报
回复
只有SQLclient
using System.Data.OleDb;
换成这个就行了。
加载更多回复(1)
内容概要:本文详细介绍了基于无刷直流电机的电子机械制动执行器的MATLAB/Simulink仿真模型,重点构建并深入分析了其非线性动力学特性。该模型深度融合了无刷直流电机的电磁动力学与制动执行机构的机械传动动力学,通过引入高精度的Stribeck摩擦模型,有效提升了对系统在启动、停止及低速运行等工况下复杂动静态摩擦行为的模拟能力,从而实现了对整个执行器系统动态响应特性、控制性能及瞬态过程的高保真仿真,为下一代线控刹车(Brake-by-Wire)系统的研发、控制算法验证与优化提供了强大的数字化设计与验证平台。; 适合人群:具备一定电机控制理论、汽车电子工程、自动化或机电一体化背景的研究生、高校科研人员及从事电驱动系统、汽车底盘控制系统开发的工程师。; 使用场景及目标:①用于电子机械制动(EMB)系统总体方案的设计、可行性验证与动态性能评估;②作为开发与在环测试(HIL/SIL)先进控制器(如高鲁棒性PID、滑模变结构控制、模型预测控制MPC等)的核心仿真平台;③深入研究电机与精密丝杠等机械部件之间的强耦合效应,以及非线性摩擦对系统控制精度、响应延迟和稳态误差的影响机制。; 阅读建议:学习者应熟练掌握MATLAB/Simulink软件操作,并具备电机学、经典与现代控制理论、机械动力学等相关基础知识,建议在理解模型架构的基础上,通过调整关键参数(如摩擦系数、转动惯量、传动比)和施加不同的指令信号与负载扰动,系统性地探究系统各环节的动态响应规律,进而进行模型的二次开发与优化。

62,271

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧