单个应用程序/计算机中的MS Access 2007数据库连接限制... [英] MS Access 2007 database connections limit in a single application/machine...

查看:97
本文介绍了单个应用程序/计算机中的MS Access 2007数据库连接限制...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有

在我的应用程序中,我必须一次保持500个以上的MS ACCESS数据库连接.

我想知道,这么多数据库连接是否会在我的桌面应用程序中产生性能或任何其他问题,并且是否有可能在一台机器上的一个应用程序中实现这么多连接对象?

如果存在任何性能问题,那么还有其他方法可以提高此类应用程序的性能.
由于某些遗留问题,我现在无法更改数据库设计.

先谢谢了,
IamHuM

解决方案

首先,您可以将所有连接放入字典中,如下所示:

Dictionary< string,OleDbConnection> dict =新字典< string,OleDbConnection>();
dict.Add("name",conn);

这样,您可以更轻松地处理它们.

关于性能问题,您可以在完成服务时间后打开连接并关闭它,而不必担心由于ADO.NET中的连接池而导致的性能.

因此,如果您可以使应用程序像这样运行而无需同时打开所有连接,那就更好了.

如果数据库的数据检索需要很多时间,那么您可以通过并行和异步编程来优化代码.

 


Hi all,

In my applications there are more than 500 MS ACCESS database connections i have to keep active at one time.

I want to know that will these many database connections will create performance or any other problem in my desktop application and is it possible to have these many connections objects possible from one application in a single machine?

If there will be any performance issue, then is there any other way to improve performance for this kind of application.
Because of some legacy issue, I can't change my database design now.

Thanks in advance,
IamHuM

解决方案

First of all you can put all of connections in a dictionary , somthing like that:

Dictionary<string, OleDbConnection> dict = new Dictionary<string,OleDbConnection>();
dict.Add("name", conn);

In this way you can deal with them much easier.

For about the performance issue you can open connection and close it after finish serval times without worry about performance because of connection pooling in ADO.NET.

So if you can make your application runs like that without open all connections at same time it will be better.

If the data retrieval for databases needs much time then you can optimize your code by Parallel and Asynchronous programming.

 


这篇关于单个应用程序/计算机中的MS Access 2007数据库连接限制...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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