System.Data.OleDb.OleDbConnectionInternal..ctor:未指定的错误 [英] System.Data.OleDb.OleDbConnectionInternal..ctor: Unspecified error

查看:2676
本文介绍了System.Data.OleDb.OleDbConnectionInternal..ctor:未指定的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个小时(〜6小时的Win7 64位,〜24小时的WinXP)上运行多线程(.NET Framework 3.5 SP1中的WinForms)中使用的.mdb我得到以下运行时错误的文件作为后端的桌面应用程序后:

After several hours (~6 hours Win7 64bit, ~24hours WinXP) of running multi-threaded (.NET Framework 3.5 SP1 WinForms) desktop application using .mdb files as backend I'm getting the following runtime error:

例外 - > 未指定的错误

堆栈跟踪 - >

在   System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString   构造,OleDbConnection的连接)
  在   System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions   选项​​,对象poolGroupProviderInfo,   池类DBConnectionPool,的DbConnection   owningObject)

at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)

在   System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(的DbConnection   owningConnection,   DbConnectionPoolGroup poolGroup)

at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)

在   System.Data.ProviderBase.DbConnectionFactory.GetConnection(的DbConnection   owningConnection)

at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

在   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(的DbConnection   outerConnection,DbConnectionFactory   的connectionFactory)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

在   System.Data.OleDb.OleDbConnection.Open()

at System.Data.OleDb.OleDbConnection.Open()

在   NetworkManager.SearchInputFileHandler.GetInputRows(SearchProgramTypeEnumeration   PROGRAMTYPE,的Int32 startRowNum,的Int32   rowsQty,布尔setupInProgress,   布尔filterOutUninitializedRows)

at NetworkManager.SearchInputFileHandler.GetInputRows(SearchProgramTypeEnumeration programType, Int32 startRowNum, Int32 rowsQty, Boolean setupInProgress, Boolean filterOutUninitializedRows)

看起来这是一个OleDbProvider错误。

It looks like this is an OleDbProvider bug.

你见过/经验类似的东西?

Have you seen/experienced something like that?

上下文:

(1)我只使用

使用(OleDbConnection的CNN =新的OleDbConnection({{mymdbConnectionStringHere}})){

using (OleDbConnection cnn = new OleDbConnection("{{mymdbConnectionStringHere}}")) {

cnn.Open();

cnn.Open();

...

}

(2)我不使用IN子句中的一些选择SQL EX pressions指向外部MDB表。

(2) I do use IN clause in some select SQL expressions to point to external MDB tables.

我想这些问题是由案(2)。虽然这仍然是一个假设这里查看(一些code修复都需要在我的应用程序的核心code和我considring现在的价值固定,或者我应该更好地切换到MS SQL后端。 )

I guess the issues is caused by case (2). Although that's still a hypothesis here to check (some code fixes are needed in the core code of my application, and I'm considring now will that be worth fixing, or I should better switch to MS SQL backend.)

感谢你。

推荐答案

有没有在找出此问题或多个stabe变通的解决方案有何进展?

Was there any progress in finding out the solution for this issue or more stabe workaround?

我在ASP.NET应用程序中类似的问题,读取Excel文件。只有在生产环境中,许多用户尝试处理在服务器端不同的XLS文件可见。在夜间回收IIS服务后,每年大约有200〜请求(打开Excel文件)挂JET引擎。问题是,所有后续的尝试失败,因此重试逻辑将没有多大帮助。只有IIS复位愈合的问题。

I have similar problem in ASP.NET application with reading Excel file. It is only visible in production environment where many users attempt to process different XLS files on the server side. After recycling IIS service at night there are around ~200 requests (to open excel) that hang JET engine. The problem is that all subsequent attempts fail so retry logic wouldn't help much. Only IIS reset heals the problem.

这是我做了有几种选择采取调查:

From the investigation I've made there are several options to take:

  1. 切换到其他图书馆看书XLS文件:    Excel的OLE自动化 - 需要Excel将在服务器上,并有许多请求会创建Excel工作的过程,是不能接受的许多实例安装。    第三方库 - 任何这些免费
  2. 将擅长处理独立的进程。与其他一些格式为XML。交易所数据
  3. 使用某种形式的智能处理控制OLEDB数开放和关闭的过程中继续。
  1. Switch to other library to read XLS files: Excel OLE Automation - requires Excel to be installed on server and having many requests would create many instances of Excel process that's not acceptable. 3rd party library - are any of these free?
  2. Move excel processing to separate process. Exchange data with some other format as XML.
  3. Use some sort of smart handling to control number of OLEDB open and closes going on in the process.

有什么想法?

这篇关于System.Data.OleDb.OleDbConnectionInternal..ctor:未指定的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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