by Dominic Zukiewicz
24. August 2007 13:05
Accessing Microsoft Access from .NET fairly straight forward through the OleDb adapters and connections. I haven't found a problem connecting to it through a Windows Application.
When you try and connect to it from a website or web service, you might find some unhelpful E_NOINTERFACE errors.
The reason is that Access was never designed to be accessed from a multi-threaded environment. Although Windows Applications can potentially be multi-threaded, the initial running process has the [STAThread] attribute, indicating that the process, as far as COM is concerned, is single threaded.
This cannot be done with Web sites and Windows Services as of their multi-request processing nature.
"What is the solution?"
The solution is to move to a more stable database solution such as Microsoft SQL Server. Your problems will disappear instantly and in the long run, this solution is much more robust and scalable.
8796c22e-b291-4e52-8a5b-6daf4c15a765|0|.0
Tags:
Framework