2013-06-27 57 views
0

我已经为我的C#应用​​程序进行了设置,但是当我将它安装在另一台计算机上时,它向我显示Path无效的错误。我使用了下面的代码。如何将数据库添加到安装程序在c#

 public string Path1 = (@"|DataDirectory|\MakeMyBill.sdf"); 
     SqlCeConnection conn = new SqlCeConnection(Path3); 
     conn.Open(); 

回答

0

如果您的应用程序创建安装之前运行良好,你只是问路,包括在建立数据库,则─

- 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] 
相关问题