BACKUP DATABASE [MyDB] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backu
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'MyDB' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'MyDB' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''MyDB'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backu
GO
Main Topics
Browse All Topics





by: udayakumarlmPosted on 2009-03-25 at 00:08:52ID: 23976620
these are the samples you can use /VB.NET/Si mple-Backu pRestore- U tility-Wit h-SQLDMO-U sing-VBNET / /KB/dotnet /SQL_Serve r_backup.a spx
http://www.aspfree.com/c/a
http://www.codeproject.com
or
you will be able to execute BACKUP command on the server using executeNonScalar function of the command