Dim sbSQL As New StringBuilder sbSQL.Append("SELECT Item_Id from MyTableA") Dim ds1 As New DataSet Using daFindOutdated As New SqlDataAdapter(sbSQL.ToString, cn) daFindOutdated.Fill(ds1) End Using Dim sbPath As New StringBuilder For Each row As DataRow In ds1.Tables(0).Rows sbPath.Append(ConfigurationManager.AppSettings("ZipFilePath") & "TBL" & row.Item("Item_ID").ToString.PadLeft(5, "0") & ".zip") If File.Exists(sbPath.ToString) Then Dim zip As New ZipArchive(New DiskFile(sbPath.ToString)) Dim folder1 As AbstractFolder = zip.GetFolder("\Item\File\") Dim file1 As AbstractFile = folder1.GetFile("Tbl.cpf") Using sw1 As New StreamWriter(file1.OpenWrite(True)) sw1.AutoFlush = True sw1.WriteLine("") sw1.Close() file1 = Nothing End Using Dim folder2 As AbstractFolder = zip.GetFolder("\Item\File\") Dim file2 As AbstractFile = folder2.GetFile("Tbl.cmp") Using sw2 As New StreamWriter(file2.OpenWrite(True)) sw2.AutoFlush = True sw2.WriteLine("") sw2.Close() file2 = Nothing End Using Dim folder3 As AbstractFolder = zip.GetFolder("\Item\File\") Dim file3 As AbstractFile = folder3.GetFile("Tbl.upc") Using sw3 As New StreamWriter(file3.OpenWrite(True)) sw3.AutoFlush = True sw3.WriteLine("") sw3.Close() file3 = Nothing End Using zip = Nothing End If sbPath.Length = 0 Next
sw1.Close() file1 = Nothing
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)