Click here to Skip to main content
13,295,472 members (51,746 online)
Click here to Skip to main content
Alternatives (5)
Add your own
alternative version

Tagged as


8 bookmarked
Posted 3 Nov 2010

Create a blank Jet database

, 13 Nov 2010
How to create a blank Jet database


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

7 Nov 2010
You can do this in a much easier way:object ADOXCat = Activator.CreateInstance(Type.GetTypeFromProgID("ADOX.Catalog"));ADOXCat.GetType().InvokeMember("Create", System.Reflection.BindingFlags.InvokeMethod, null, ADOXCat, new string[] { ConnectionString });
18 Nov 2010
another way is to first create a empty db in access then read its bytes into an array and export them as a string. Then hardcode that string into a class that creates the the empty database by converting the hardcoded string back into a byte array and then writing it to disk as a mdb...
23 Nov 2010
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...
13 Nov 2010
And here is the long version, provided from Microsoft:[^]using System;using ADOX;namespace ConsoleApplication1{ class Class1 { [STAThread] static void Main(string[] args) { ...
26 Nov 2010
This line:ADOX.CatalogClass cat = new ADOX.CatalogClass();may not work if you are using C# 4.0+You will needADOX.Catalog cat = new ADOX.Catalog();For a completed method checkout:[^]


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


About the Author

Walt Fair, Jr.
Engineer Comport Computing
United States United States
Walt has been playing with software since around 1967 and has generated more runtime errors than the average village idiot. He is a CEO, Petroleum Engineer, software consultant, janitor, and now a graduate student again. Rather than sleep, he also plays with algorithms and systems for technical computing, develops software for engineering evaluations and is an avid amateur radio operator.

Walt was admitted back to UT Austin and is actually attempting to complete a PhD in engineering, thereby proving that he is crazier than the average old fart.

And now UT has gone and admitted Walt to PhD candidacy,now my disertation has been submitted and it is underreview, has been reviewed,so I'm preparing for my defense to I can wrtap things up and graduate. proving that old guys can still ... what was he doing again?

| | Privacy | Terms of Use | Mobile
Web01 | 2.8.171207.1 | Last Updated 13 Nov 2010
Article Copyright 2010 by Walt Fair, Jr.
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid