Connecting to Access databases in .NET.

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.

Tags:

Framework

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar