I've developed a software using VB.Net and SQL compact edition database. (.sdf file)
Now i want to add my .sdf file to setup file. I've search internet and create setup file.
when i install the software, it is created new folders in program files including my database file and exe file.
after double clicking exe file, it is open the software. but when using, it's shown a message "connection current state is closed". but when i run my vb project, it is working well.
other details.
=============
1) I create data base inside of <myProject>/bin/debug
2) I've created setup file using this method.
File menu --> add --> new project
Then, Setup and deployment -> Visual studio installer
After that I selected Setup project, then click OK.
3) I add database using this
Right click on setup file -> add -> file (In solution explorer window)
Then i selected my .sdf file.
this is my connection string
sqlcon = New SqlCeConnection("Data Source=" + (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)) + "\stuDB.sdf")
It is created only 3 files in Program files.
1. my exe
2. my sdf file
3. System.Data.SqlServerCe.dll file