Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15549

Restore DB

$
0
0
I Hope this is in the correct place. I created and app with visual studio 2012 using sql Server Compact for a localDb I have code to copy the sdf file so as to have a back. problem is when I bring it back into the program I get an error saying problem finding file. The code is.
Code:

        ChDir(Path:=("\Users"))
        If (FolderBrowserDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK) Then
            ChDir(Path:=FolderBrowserDialog1.SelectedPath)
            FileCopy("C:\program Files (x86)\our Family\Database1.sdf", "Datbase1.sdf")

            Try
                MessageBox.Show(" Your Data Has Been Backuped Succesfuly", "InFormation")
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
        End If
    End Sub

This work fine as far a copying but need help to make the program see the file.
Yhank you all for any help
Gene

Viewing all articles
Browse latest Browse all 15549

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>