The file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\project_blank_blank.mdf' cannot be overwritten. It is being used by database 'project_blank_blank'. File 'project_blank_blank' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\project_blank_blank.mdf'. Use WITH MOVE to identify a valid location for the file. The file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\project_blank_blank_log.LDF' cannot be overwritten. It is being used by database 'project_blank_blank'. File 'project_blank_blank_log' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\project_blank_blank_log.LDF'. Use WITH MOVE to identify a valid location for the file. Problems were identified while planning for the RESTORE statement. Previous messages provide details. RESTORE DATABASE is terminating abnormally. Changed database context to 'master'.
Dim str As New SqlCommand("use master; RESTORE DATABASE " & txtCompanyCode.Text & " FROM disk='" & dest & "'", con)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)