Restore database
You can use this code to restore database into SQL server Private Sub BtnRestore_Click(sender As Object, e As EventArgs) Handles BtnRestore.Click Try Dim database = CmbDatabase .Text Dim ServrnameRestore = CmbServer .Text .Trim Dim OpenFile1 As New OpenFileDialog Dim Constr As String Constr ="Data Source=" & ServrnameRestore &"; Initial Catalog=master; Integrated Security=True" 'Open connection