0

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();
4

1 回答 1

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]
于 2013-06-27T05:44:17.023 回答