Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Create a blank Jet database

By , 23 Nov 2010
Rate this:
Please Sign up or sign in to vote.
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();
     var db=engine.CreateDatabase(fileName,locale,option);
 
fileName: full path of the new blank database file
 
locale: collating order and password
 
option: 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:
 
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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

ISanti

Spain Spain
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 23 Nov 2010
Article Copyright 2010 by ISanti
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid