Loading

Backup and Restore SQL using VB.net 2008/2010

Submitted by: 
Visitors have accessed this post 5842 times.




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

Download Code: 

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 goodcharlot_don99@yahoo.com,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

Add new comment