Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6975665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:23:51+00:00 2026-05-27T17:23:51+00:00

I have a Windows mobile 6 application.When a new patch is Available on server

  • 0

I have a Windows mobile 6 application.When a new patch is Available on server it will download the New Cab file and install progrmatically on the device with the below Code

Process proc = Process.Start("wceload.exe", "\"" + Path.Combine(applicationPath, updateFileName) + "\"");
  proc.WaitForExit();

But this is deleting The existing Database[Sql CE] and Valuable Datas also.

I need to keep the Database On device and uninstall the application and install the new cab file where no need to install the Fresh DB again along with NEW cab installation…

How can i achieve this…help me on this????

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:23:52+00:00Added an answer on May 27, 2026 at 5:23 pm

    Before unstalling, backup the database file (typically .sdf). After the installation, replace the new database file with your backup.

    // backup the CE database
    string databasePath = ""; // location of your database
    string backupPath = ""; // choose a backup path
    try
    {
        File.Copy(databasePath, backupPath);
    }
    catch 
    {
        Trace.TraceError("Error creating backup");
    }
    
    
    Process proc = Process.Start("wceload.exe", "\"" + Path.Combine(applicationPath, updateFileName) + "\"");
    proc.WaitForExit();
    

    Then, after re-installation, delete the new CE database and restore your backup:

    if (File.Exists(databasePath))
    {
        try 
        {
             File.Delete(databasePath);
        }
        catch 
        {
             Trace.TraceError("Error deleting new database");
        }
    }
    
    string databasePath = ""; // location of your database
    string backupPath = ""; // choose a backup path
    try
    {
        File.Copy(backupPath , databasePath);
    }
    catch 
    {
        Trace.TraceError("Error restoring backup");
    }
    

    If you can’t delete the new database because it is in use, you’ll need to come up with a mechanism to work around that (for example, renaming the new DB, then copying your backup, and then rebooting your application/device)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows mobile 5.0 application (smartphone) that contains a flat data file
I have windows mobile application that display information from an sql server ce. Normally
I have the following problem: I implemented a managed mobile application for Windows Mobile
I have an game application I have written for Windows Mobile and I want
I have an application that runs on Windows Mobile 6 Professional PDA devices. The
We have a business application written for Windows mobile. It has people doing inventories.
I have to build a GUI application on Windows Mobile, and would like it
I have written a basic Application for windows mobile 5. It is using visual
I have a .net 3.5 application running on windows mobile professional that uses sql
I have a WTL 8.0 SDI application for Windows Mobile 5. In this contrived

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.