none
Connection string problems with SQL compact database .sdf file

    Pregunta

  • I am trying to deploy a simple windows application to a test computer (not my development computer). I am usinf a SQL compact .sdf database file in my solution. When I publish the solution and install it on the test computer I get this error "the path is not valid check the directory for the database" and it shows me that the connection string is what is was set to this whole time while I built the app which is : 

    C:\Users\Eamon\Desktop\VT versions\Vendor Tracker 2.0\VendorTracker 2.0\Database1.sdf"

     

    I've tried changing the connection string to exactly where it would be on the test computer but I still get the error. Am I overlooking something? How to a take the .sdf databse that I put in my windows application, along when I deploy my app to another computer? Confused.

     

     

    jueves, 08 de julio de 2010 22:02

Todas las respuestas

  • Hi,

      How did you specify your sdf file path? Did your application store the path in the registry or is there some cache? It seems that your change does apply. Could you rebuild the application to have the change come into effect?


    Please mark the right answer at right time.
    Thanks,
    Sam
    • Editado SamAgain viernes, 09 de julio de 2010 6:57 refine
    • Marcado como respuesta SamAgain viernes, 16 de julio de 2010 7:23
    • Desmarcado como respuesta SamAgain viernes, 13 de agosto de 2010 13:20
    viernes, 09 de julio de 2010 6:56
  • Hi,

      I am writing to check the status of the thread. How is the problem going on?


    Please mark the right answer at right time.
    Thanks,
    Sam
    miércoles, 14 de julio de 2010 8:43
  • We temporarily mark a reply, please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Please mark the right answer at right time.
    Thanks,
    Sam
    viernes, 16 de julio de 2010 7:23
  • Sorry for not getting back. I am still having trouble with the SQL Server Compact file. Is there a walkthrough somewhere on how to deploy a win forms app using a SQL Server Compact file as the database?
    jueves, 12 de agosto de 2010 16:31
  • The path you have mentioned is user specific path so i would suggest you to use some path which is not on desktop or on user specific folder. On test machine there could be some access issue.

    You can craete any folder on c or d drive and use that.

    • Propuesto como respuesta Shyam Sohane martes, 01 de febrero de 2011 8:36
    martes, 01 de febrero de 2011 8:36