Click here to Skip to main content
15,891,707 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB
Imports System.Data
Imports System.Data.OleDb
Imports System.IO
Imports System.IO.Compression

Public Class DbBackup
    Private Sub btnbackup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbackup.Click

        Dim zipPath As String = "c:\example\start.zip"
        Dim extractPath As String = "c:\example\extract"

        Using archive As ZipArchive = ZipFile.OpenRead(zipPath)
            For Each entry As ZipArchiveEntry In archive.Entries
                If entry.FullName.EndsWith(".txt", StringComparison.OrdinalIgnoreCase) Then
                    entry.ExtractToFile(Path.Combine(extractPath, entry.FullName))
                End If
            Next
        End Using    
End Class
Posted
v2
Comments
[no name] 1-Aug-13 7:22am    
Did you maybe have some sort of a question?
Vinay Mali 2-Aug-13 1:53am    
Actualy its works backup but hot to sestore...
ZurdoDev 1-Aug-13 8:07am    
What do you want?
Vinay Mali 2-Aug-13 1:53am    
How to restore backup database..
ZurdoDev 2-Aug-13 7:37am    
There are lots of samples online. Please use the improve question link to post the code you are using but are stuck on.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900