![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Greetings, I am presently working a Web development contract where I am locked into using an Access 2002 database as the backend datastore. I understand that this is not optimal, but the web app will be accessed by a minimal number of users as it is an internal system to the organization and they do not wish to spend the money on an SQL Server or SQL Server hosting at this time. Also, I do not have administrative priveleges on the Web server so using the desktop version of SQL Server is also out of the question. Ultimately I will employ dataset caching on the web server as most of the data will remain static for long periods of time, further reducing the load on the database. That said, it has been some time since I have worked with OLE DB and the MS Jet database engine, and I have hit a snag that I'm sure someone in this group will be able to answer quickly. My current architecture is as such: I have an ASP.NET application written in C#, utilizing strongly typed datasets. The data access code lives in business objects in a project separate from the Web project within the VS.NET solution. The data access methods I have written create the OLE DB connection, run a stored procedure (parameter query) populating the dataset, close the connection and return the strongly typed dataset to the calling location. This works flawlessly. The only problem I experience is when two clients attempt to access the database at exactly the same time. Then one or both of the clients recieves the following message: "The connection is already Open (State=Open)" Obviously, one client has already opened the connection and the other is attempting to do the same. Initially I thought that this might be a problem with my data access structure since I had created an API-like structure using static methods, however the probem persists even with the use of instance methods and variables. I am hoping that there is some sort of setting that I am missing in my connection string and that I am not going to have to write any crazy threading/event handling code to do something that would seem to be very common. Currently my connection string is pretty basic providing the Provider and Path to the datastore. Any insight into this issue is greatly appreciated. Thanks in advance, Lance. |
![]() |
| Thread Tools | |
| Display Modes | |
| |