Click here to Skip to main content
15,885,365 members
Articles / Database Development / SQL Server

SQL Server Database Backup Utility using VB.NET and SQL-DMO (New version)

Rate me:
Please Sign up or sign in to vote.
4.77/5 (26 votes)
17 Mar 2008CPOL5 min read 308.9K   21.2K   143  
A Windows application to backup and restore SQL server tables,views,user defined functions and stored procedures
'   Database backup utility:
'   ========================
'   Copyright (C) 2007  Shabdar Ghata 
'   Email : ghata2002@gmail.com
'   URL : http://www.shabdar.org

'   This program is free software: you can redistribute it and/or modify
'   it under the terms of the GNU General Public License as published by
'   the Free Software Foundation, either version 3 of the License, or
'   (at your option) any later version.

'   This program is distributed in the hope that it will be useful,
'   but WITHOUT ANY WARRANTY; without even the implied warranty of
'   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'   GNU General Public License for more details.

'   You should have received a copy of the GNU General Public License
'   along with this program.  If not, see <http://www.gnu.org/licenses/>.

'   This program comes with ABSOLUTELY NO WARRANTY.Imports System.Windows.Forms
Imports System.Threading
Public Class MainMenu
    Private Sub DatabaseBackupToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DatabaseBackupToolStripMenuItem.Click
        frmDatabaseBackup.MdiParent = Me
        frmDatabaseBackup.WindowState = FormWindowState.Maximized
        frmDatabaseBackup.Show()
    End Sub
    Private Sub DatabaseRestoreToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DatabaseRestoreToolStripMenuItem.Click

        frmDatabaseRestore.MdiParent = Me
        frmDatabaseRestore.WindowState = FormWindowState.Maximized
        frmDatabaseRestore.Show()
    End Sub

    Private Sub DatabaseBackup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DatabaseBackup.Click
        DatabaseBackupToolStripMenuItem_Click(Nothing, Nothing)
    End Sub

    Private Sub DatabaseRestore_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DatabaseRestore.Click
        DatabaseRestoreToolStripMenuItem_Click(Nothing, Nothing)
    End Sub

    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
        End
    End Sub

    Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
        frmAbout.ShowDialog()
    End Sub
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions