how many users can open a connection to Microsoft Access?
how many users can open a connection to Microsoft Access database simultaneously ? I am using asp.net 4.0 to write my application.
<add name="E_ShopAccessConnectionSt开发者_JAVA技巧ring" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\report.mdb;Persist Security Info=True" providerName="System.Data.OleDb"/>
The Access database has a limit of 256 connections, but there is a limit of 64 connections per process in the database drivers, and as IIS is a single process your limit is 64.
If you are careful to close your connections, commands and data readers properly, this is usually enough for plenty of users. Each visitor doesn't need a connection of their own.
You are likely to run into other limitations before you run out of connections. If you have many visitors, you will find that the Access database is simply not fast enough, and you need a more advanced database system.
If you are running out of connections, that is most likely because you are not closing database objects properly, so that they are still keeping the database connection alive until they are garbage collected.
According to Microsoft: A maximum of 64 connections per process with a limit of 256 concurrent open read/write connections per database.
But with my experience above 20 connections performance goes down significant.
If you're using MS Access from ASP.NET the site runs under the context of a single user so shouldnt have too many issues.
[Most people wont agree, but I have had experience using MS Access with both ASP and ASP.NET on a fairly high transactional site and it worked fine, make sure the DB is the latest version of MS access]
I would consider using SQL Server Express as an alternative though.
Not enough.
The depending on the version you can have 5 to 10 but safely its really < 3 for "high volume per user work".
Technically it can get much higher but have had some bad experiences trying to recover files. Generally we advise > 5 as an average should move to something like SQL Server as the backend with the MS Access mapping for the front end.
精彩评论