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????
Before unstalling, backup the database file (typically .sdf). After the installation, replace the new database file with your backup.
Then, after re-installation, delete the new CE database and restore your 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)