Dim connSQL As SqlClient.SqlConnection
Dim strConn As String = "Data Source=" & Server & ";Integrated Security=SSPI;Initial Catalog=Master"
connSQL.ConnectionString = strConn
query = "RESTORE DATABASE " & strDB & " FROM DISK='" & strBackup & "' WITH REPLACE")
Using cmd As New SqlCommand(query, connSQL)
intReturn = cmd.ExecuteScalar()
Open in new window
IT issues often require a personalized solution. With Ask the Experts™, submit your questions to our certified professionals and receive unlimited, customized solutions that work for you.