Backup and Restore SQL using VB.net 2008/2010

Submitted by: 
Visitors have accessed this post 29405 times.

Hi this is program make a vb.net 2008 to back up and restore SQL server


Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

I like this site

can this program backup\restore some like store procedure....

can u help me how to backup and restore in vb6?, i got an error in my code "Operation is not allowed when the object is closed" if i remove the "Conn.Close" i got an error again "Run-time Error '70' Permission Denied" pls help me.. here is my email [email protected],just pm me, tnx

here is my code:

Private Sub Command1_Click()
Dim Source, Destination As String

Conn.Close
Source = App.Path & "\login.mdb"
Destination = App.Path & "\Backup\" & Format(Date, "mmmm dd, yyyy") & " " & Format(Time, "h_mm_ss") & ".mdb"
FileCopy Source, Destination

MsgBox " Backup!", vbInformation, ""
Conn.Open

End Sub

Back Up works but the restore cannot be done.

Please I would like to have a version of OLEDB code of this backup and restore function of this code. since I am using Access database. accdb. thank you

Worked very well for me. Well done

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3>
  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.