Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
2.67/5 (3 votes)
See more:
Is there anyway to pack a database into the project's executable file ? The Embedded Resources option is not working in this case as well as the Entity Deploy.

I'd like to pack everything inside a project into a single file but I can't put the database in there.
Posted
Updated 4-Feb-13 8:46am
v2
Comments
Uday P.Singh 4-Feb-13 14:52pm    
what do you mean by database here?
Jackson Mackson 4-Feb-13 14:52pm    
A SQL Databse (.MDF)
Uday P.Singh 4-Feb-13 14:59pm    
why would you do that?
Jackson Mackson 4-Feb-13 15:03pm    
I just want to know if it is possible at all. If so how could it be done.
Sergey Alexandrovich Kryukov 4-Feb-13 17:38pm    
A database?! You can but... is it OK that it would be read-only? And then, why?
—SA

1 solution

 
Share this answer
 
Comments
Jackson Mackson 4-Feb-13 15:10pm    
I did those things, it causes error , says either the database does not exist or another database with the same name is there. Or it puts it in the release folder. So it means it has not been embedded inside the project anyway.
Jackson Mackson 4-Feb-13 15:13pm    
The reason for the error might be because it looks for it but nothing is there, I have set the address to |DataDirectory|, so it looked for the database in the release folder. I want the program to search for the database inside the exe file.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900