当前位置: 动力学知识库 > 问答 > 编程问答 >

asp.net - How to add database to setup in c#

问题描述:

I have made a setup for my C# application but when i installed it on another computer, it showed me an error that Path is invalid. I used the following code.

 public string Path1 = (@"|DataDirectory|\MakeMyBill.sdf");

SqlCeConnection conn = new SqlCeConnection(Path3);

conn.Open();

网友答案:

if your application is running fine before creating setup and you are just asking the way to include database in setup then-

- I put the database with exe [in bin->debug folder]
- and while creating setup i put the database in Application folder with .exe.
  [as you know there are 3 parts in file system -Application folder , user's desktop and user's program menu]
分享给朋友:
您可能感兴趣的文章:
随机阅读: