老师使用以下代码,可以正常备份,但是在数据库中还原就说备份文件错误!
Dim cmd As New SQLCommand
cmd.C
Dim d As Date = Functions.Execute("GetSeverDate").date
Dim mdf As String = "SmtZzb20220503184929"
cmd.CommandText = "use master;BACKUP DATABASE [" & mdf & "] To DISK = \'D:\\SQL_Backup\\" & mdf & "_" & d.Year & d.Month & d.Day & ".bak\';"
cmd.ExecuteNonQuery