首页 新闻 会员 周边 捐助

麻烦各位高手帮忙看看

0
悬赏园豆:30 [已关闭问题]
<P>我的网页在本机调试浏览完全没问题<BR>发到服务器之后一段时间后就报这种错误<BR>一般按常理应该是读取器对象使用后没有关闭,但我在这个小网站中没有使用过读取器对象,就是一个command和Dataset<BR>至今也没搞明白,是什么原因,请求各位帮忙分析一下,都研究大半天也没打出原因!</P> <P><FONT color=#008000><STRONG>下面这是在网页所报的错误!</STRONG></FONT>&nbsp;</P> <P><FONT color=#ff0000 size=5>Server Error in '/' Application.</FONT><BR><FONT color=#ff0000>--------------------------------------------------------------------------------</FONT></P> <P><FONT color=#ff0000>未指定的错误</FONT> <BR>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. </P> <P>Exception Details: System.Data.OleDb.OleDbException: 未指定的错误</P> <P>--------------------------------------------------------------------</P> <P>这是我使用的OleDb的操作类</P> <P>using System;<BR>using System.Web;<BR>using System.Collections.Generic;<BR>using System.Text;<BR>using System.Collections;<BR>using System.Data;<BR>using System.Data.OleDb;<BR>using System.Configuration;<BR>using System.ComponentModel;</P> <P>namespace OleDbHelper<BR>{<BR>&nbsp;&nbsp;&nbsp; public class OleDbHelper<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// 连接数据源<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private OleDbConnection MyConn = null;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //private readonly string RETURNVALUE = "RETURNVALUE";</P> <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// 打开数据库连接.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// &lt;/summary&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void Open()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 打开数据库连接<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (MyConn == null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyConn = new OleDbConnection(ConfigurationManager.AppSettings["oledbConnectionString"].ToString());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (MyConn.State == ConnectionState.Closed)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ///打开数据库连接<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.NET的春天的主页 .NET的春天 | 初学一级 | 园豆:180
提问于:2008-06-08 15:56
< >
分享
其他回答(6)
0
搞个dump用windbg分析分析~~~
沙加 | 园豆:3680 (老鸟四级) | 2008-06-09 17:29
0
把所有的错误信息都贴出来吧
Jun1st | 园豆:240 (菜鸟二级) | 2008-06-09 20:21
0
把异常的堆栈贴出来,好分析。
玉开 | 园豆:8822 (大侠五级) | 2008-06-10 08:54
0
你把IIS重新启动后还有这种现象吗? 如果当时没有,而过了一段时间又出现,则有可能是连接池的设置问题。
致博腾远 | 园豆:1389 (小虾三级) | 2008-06-10 09:33
0
东西给的太少,看不出来。用的是access数据库吧,路径有没有问题吗?
MartinGao | 园豆:663 (小虾三级) | 2008-06-10 18:50
0
你要不在代码里用一下Try {}catch(){}
悟〈--觉 | 园豆:145 (初学一级) | 2008-06-12 22:19
0
Server Error in '/' Application. -------------------------------------------------------------------------------- 未指定的错误 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: 未指定的错误 这种错误出现的情况多的去了,,,,信息给的太少,看不出来
Jared.Nie | 园豆:1940 (小虾三级) | 2008-06-14 16:42
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册