Results 1 to 5 of 5

Thread: [RESOLVED] Deploying existing database to PDA

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2008
    Posts
    32

    Resolved [RESOLVED] Deploying existing database to PDA

    Hi All,

    My first time posting here.

    I am using Visual Basic 2005 and I'm developing software for a Windows CE 5.0 device.

    The application works with an exisiting database files which is SQL Server CE (*.sdf). The database file could be found at 'C:\Documents and Settings\Administrator\My Documents\Database1.sdf'.

    Can anyone tell me how can I deploy this exisiting database to the PDA? I will also to deploy this database to a Cab so it can be installed on the PDA device.

    I tried to adding the database file as Resource by going to Properties of the Solution Explorer and then adding the sdf file. It gave an error about the database version.

    I can view my database via the Server Explorer within Visual Studio so the database is working.

    Can anyone please advise about deploying an exisiting database? I searched this forum and I had no luck.

  2. #2
    Hyperactive Member
    Join Date
    May 2005
    Location
    London United Kingdom
    Posts
    334

    Re: Deploying existing database to PDA

    Hi, there is nothing like "C:\" on the device so you should check your connection string and use mydocument then the folder where the Db is. Normally when you Install the app it has a folder in program files so I suggest you store the DB in that folder and direct your connection string to connect to it.

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2008
    Posts
    32

    Re: Deploying existing database to PDA

    Wiadus,

    Thanks for your reply.

    I have tried putting the database in the Release folder of the Solution Project. I have attached it to the project and then deploying it.

    The database does not copy to the PDA in any shape or form whether it is in My Documents or Program Files. Visual Studio does not copy the database.

    Is there an option where I can get it to copy to the PDA?

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Deploying existing database to PDA

    If you add it to your project, and set it to 'copy if newer' - when you run your project it will be copied
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2008
    Posts
    32

    Re: Deploying existing database to PDA

    Petevick, thanks for your help. It worked.

    Thank you all for your help. I'll mark this thread as resolved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width