Backup Database SQL Server 2000 dengan Visual Basic 2005

Kebetulan ketika sedang jenuh mengerjakan program, saya jadi ingin menambahkan fitur backup database.

Berikut snippet codenya

Dim bdi As New SMOObject.BackupDeviceItem
bdi.Name = “backup.bak”
bdi.DeviceType = SMOObject.DeviceType.File
backup = New SMOObject.Backup
backup.Database = “Database”
backup.Devices.Add(bdi)
backup.Initialize = True
Dim server As New SMOObject.Server(“Server”)
backup.SqlBackup(server)

This entry was posted in VB 2005 and tagged , , , , , , , , , . Bookmark the permalink.

One Response to Backup Database SQL Server 2000 dengan Visual Basic 2005

  1. ruben says:

    perlu g melakukan backup pada program dengan menggunakan database sql server

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>