I like to use the old JET API to manipulate ACCESS Databases.
In C# 4 all you need to create a blank JET database is add a reference to Microsoft.Office.Interop.Access.Dao library in your WINDOWS FORMS project, and two simple lines of code:
var engine=new DBEngine();
: full path of the new blank database filelocale
: collating order and passwordoption
: encrypt database and file format version (dbVersion10 for JET 1.0, dbVersion20 for JET 2.0 ...).
JET API is no more called JET.
Sorry, I'm spanish and my english is not good, so I prefer to copypaste from wikipedia to explain:With version 2007 onwards, Access includes an Office-specific version of Jet, initially called the Office Access Connectivity Engine (ACE), but which is now called the Access Database Engine.
This engine is fully backward-compatible with previous versions of the Jet engine, so it reads and writes (.mdb) files from earlier Access versions.
It introduces a new default file format, (.accdb), that brings several improvements to Access..
If you don't own office 2007 or 2010, you can get several libraries for access here:
<a href=""http://blogs.msdn.com/b/access/archive/2010/05/10/download-access-2010-runtime-database-engine-redistributable-and-source-code-control.aspx"">download libraries for free
I know JET is a deprecated way, but I'm also near to be deprecated, and JET (or ACE) is an easy and direct way for ACCESS databases.
It's not better, it's just different... and deprecated.