none
Publish app with sdf file: App cant find sdf file on startup

    Question

  • I tried different Connection Strings:

    string SqlCeConnectionString = ("Data Source=" + (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)) + "\\MyDB.sdf;Persist Security Info=False;");
    string SqlCeConnectionString = "Data Source=.\\MyDB.sdf;Persist Security Info=False;";
    string SqlCeConnectionString = "Data Source=|DataDirectory|\\MyDB.sdf";

    nothing works.

    the setup installs the exe in

    C:\Users\username\AppData\Local\Apps\2.0\1C1EGPV1.P4R\56LLV010.2KD\visu..tion_c62c64a8a0dbac4c_0001.0000_5ebabaeba8908fad

    and the sdf in

    C:\Users\username\AppData\Local\Apps\2.0\1C1EGPV1.P4R\56LLV010.2KD\visu...exe_c62c64a8a0dbac4c_0001.0000_de-de_38ebd03188c0d379

    isnt that strange?

    henry


    Monday, December 23, 2013 9:00 PM

All replies