I'm working with sql server ce database and C#, and I wondering how to really embed the database file so when I have finish installing the app I don't need to copy-paste the database file to the environment as I set in the following code :
private void sambung()
{
string lokasifile = Environment.CurrentDirectory + "\\compactedition.sdf";
string stringkoneksi = "Data Source = \"" + lokasifile + "\";Password = 'blablabla'; Encrypt = True";
koneksi = new SqlCeConnection(stringkoneksi);
}
Do you have any suggestion to make it possible? Thanks.
.sdffile with data already in it? Or could you just use theSqlCeEngine.CreateDatabase()call to create an empty.sdfdatabase for you?