Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any ORMs that work with MS-Access (for prototyping)?

Tags:

c#

orm

ms-access

I'm in the early stages of a project, and it's not clear yet whether we'll need a "real" database (i.e. SQL Server et al). So I've been doing some prototyping using MS-Access, which is working fine so far. (developing in C#/VS2008/.Net 3.5/MS-Access 2000).

However, the object-relational impedance mismatch is already becoming annoying, and will only get worse as the project evolves.

I have not been able to find an ORM that will work with MS-Access. Any suggestions?

Edit - Follow Up We ended up using Fluent NHibernate, mainly because it Automaps our object model to a relational database, which has been a huge win for us. Most of the FNH code samples we found used SQLite, and this worked so well that we intend to use it for our production database. (The app is a desktop scientific data collection and analysis package).

like image 287
Tom Bushell Avatar asked Oct 06 '09 19:10

Tom Bushell


People also ask

What are forms used for in MS Access?

A form in Access is a database object that you can use to create a user interface for a database application. A "bound" form is one that is directly connected to a data source such as a table or query, and can be used to enter, edit, or display data from that data source.

Can Microsoft Access be used to create forms?

Create a form from an existing table or query in Access. To create a form from a table or query in your database, in the Navigation Pane, click the table or query that contains the data for your form, and on the Create tab, click Form. Access creates a form and displays it in Layout view.

How many types of MS Access forms?

There are two types of forms in Access. The first kind is a bound form. Bound forms are forms that have data that is connected between the form and your Access database. These are dependent on one another which means when data is changed in the bound form, it is also changed in the database that it is bound to.


2 Answers

MSAccess files can be set up as an ODBC source on Windows machines. Almost any ORM will allow you to use ODBC. Here is a quick tutorial on how to set that up, it's outlined for Win2k but the process is the same for XP+. You also need to have MDAC installed on your box.

NHibernate seems to have native support of MSAccess as well, see here. I've never used it though. It also has an ODBC driver.. Many others support ODBC as well.

And again, as others are saying.. MSAccess does not scale... period. Installing a real database server is fairly easy, so I'd recommend SQL Server Express as others have, or even MySQL or Postgre, whatever is easier to set up.

If this is an application that you intend to deploy to clients, with each client having their own unique database, I would recommend another solution entirely, SQLite. SQLite gives you database power on an app by app basis. If you have a central database server, one of the previously mentioned solutions would be best.

like image 115
snicker Avatar answered Sep 30 '22 11:09

snicker


There's only one scenario when choosing the Access Database Engine is a good choice: when building a self-contained Access application using Access Forms (though choosing to use Access in the first place is a questionable choice ;)

The database engine that VS2008 plays nicest with is SQL Server and you will have no problem finding an ORM that plays nice with SQL Server.

like image 34
onedaywhen Avatar answered Sep 30 '22 09:09

onedaywhen