locked
Deploy Compact 3.5 SP1 to storage card RRS feed

  • Question

  • I am able to deploy my application to the emulator storage card (shared folder). The compact database deploys to the root folder and not to the storage card.
    The db is too big for the main memory so I need to deploy to the card.
    I tried setting the path in the local connectionstring to Data Source=Storage Card\database.sdf and it still deploys to the root.
    Any ideas?
    Wednesday, September 2, 2009 6:36 PM

Answers

  • I made a silly error and was not using the same path for the RDA as I was the database creation.
    • Marked as answer by forwheeler4 Wednesday, September 2, 2009 9:53 PM
    Wednesday, September 2, 2009 9:53 PM

All replies

  • I am able to deploy my application to the emulator storage card (shared folder). The compact database deploys to the root folder and not to the storage card.
    The db is too big for the main memory so I need to deploy to the card.
    I tried setting the path in the local connectionstring to Data Source=Storage Card\database.sdf and it still deploys to the root.
    Any ideas?

    OK, It was working the whole time but I had the database in 2 locations so I didn't think it was working.
    Anyway, I get the database to create but when I do a RDA pull, it won't write to the database if it is on the storage card but it will if it is in the root of the device.
    My connection string is

    string localConnectionString = @"Data Source=Storage Card\Mobile.sdf;File Mode=Read Only;Persist Security Info=False;";

    If I change it to

    string localConnectionString = @"Data Source=Mobile.sdf;File Mode=Read Only;Persist Security Info=False;";
    it works fine.

    Is there security I need to change or will it not connect to a sdf in a subdirectory? Is there a pathing problem from the application itself?

    Wednesday, September 2, 2009 7:31 PM
  • The error I am getting is:

    SQL Server Compact encountered problems when opening the database. [ Internal Error Number = 25046,Internal Error String = The database file cannot be found. Check the path to the database. [,,,Data Source,,]  
    Wednesday, September 2, 2009 7:41 PM
  • I made a silly error and was not using the same path for the RDA as I was the database creation.
    • Marked as answer by forwheeler4 Wednesday, September 2, 2009 9:53 PM
    Wednesday, September 2, 2009 9:53 PM