Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#

Create a blank Jet database

5.00/5 (1 vote)
18 Nov 2010CPOL 8.1K  
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...
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 file.

It's similar to the method that you are suggesting here. But It can be wrapped into a reusable class that won't require importing a mdb file into the project.

It's not better, it's just different.

License

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