Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Create a blank Jet database

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
18 Nov 2010CPOL 7.7K   1   1
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)


Written By
Software Developer
United States United States
I am a part time programmer, The more I learn, the more I need to learn, the best of which I will share here on codeproject!

Visit my site and blog

Comments and Discussions

 
GeneralReason for my vote of 5 Works for all file type to create by... Pin
snoopy00124-Nov-10 20:22
snoopy00124-Nov-10 20:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.