c# 4.0 - not ab;e to restore database from .bak file -


i habe taken backup of sql server ce database not able resotore it.

   try       {           string filename = "tapedatabase.sdf";           string sourcepath = backuppath;           openfiledialog ofd = new openfiledialog();           ofd.showdialog();           string fn = ofd.filename;            string restorepath =   path.getdirectoryname(system.windows.forms.application.startuppath);            string sourcefile = system.io.path.combine(fn);           string destfile = system.io.path.combine(restorepath, filename);           try           {            system.io.file.copy(sourcefile, destfile, true);            messagebox.show("database restored to: " + destfile, "info");           }           catch(exception epp)             {               messagebox.show("database not restored");             } 


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -