You are on page 1of 2

Trong Luc: Dim pInfo As New ProcessStartInfo

Dim pInfoZip As New ProcessStartInfo


Dim pPro As New Process
Dim i As Integer = 0
Dim j As Integer = 0
Try
''Export dữ liệu
pInfo.FileName = "exp.exe"
'Back up full
If chedoexport = 1 Then
pInfo.Arguments = strParameter
pInfo.WindowStyle = ProcessWindowStyle.Hidden
'Start the process.
pPro = Process.Start(pInfo)
'Wait for the process to exit.
pPro.WaitForExit()
Trong Luc: End If
If chedoexport = 3 Then
pInfo.Arguments = strParameter + " ROWS = N"
pInfo.WindowStyle = ProcessWindowStyle.Hidden
'Start the process.
pPro = Process.Start(pInfo)
'Wait for the process to exit.
pPro.WaitForExit()
End If
Trong Luc: If chedoexport = 21 Then
ten_thumuc = "TABLES_" + Now.ToString("ddMMyyyyhhmmss")
s_folder = strDest1 & "\" + ten_thumuc
If System.IO.Directory.Exists(s_folder) = False Then
System.IO.Directory.CreateDirectory(s_folder)
End If
For i = 0 To arr_dieukien.Length - 1
j = i
If arr_dieukien(j) <> "" Then
strParameter = strDataBaseName & "/" & strPass & "@" & s
trSYSID & " LOG= " & s_folder & "\" & arr_dieukien(j) & "_" & strTmp & "_" & str
STT & ".log FILE=" & s_folder & "\" & arr_dieukien(j) & "_" & strTmp & "_" & st
rSTT & ".DMP"
pInfo.Arguments = strParameter & " tab
Trong Luc: pInfo.Arguments = strParameter & " tables = "
+ arr_dieukien(j) + " query = \""" + arr_dieukien(j + 1) + " \"""
pInfo.WindowStyle = ProcessWindowStyle.Hidden
'Start the process.
pPro = Process.Start(pInfo)
'Wait for the process to exit.
pPro.WaitForExit()
End If
i = j + 1
Next
End If
Trong Luc: If chedoexport = 20 Then
Dim s As String = ""
For i = 0 To arr_dieukien.Length - 1
If arr_dieukien(i) <> "" Then
s = s + arr_dieukien(i) + ","
End If
Next
Trong Luc: s = s.Substring(0, s.Length - 1)
pInfo.Arguments = strParameter & " tables = (" + s + ")"
pInfo.WindowStyle = ProcessWindowStyle.Hidden
'Start the process.
pPro = Process.Start(pInfo)
'Wait for the process to exit.
pPro.WaitForExit()
End If
Trong Luc: If chedoexport = 1 Or chedoexport = 20 Or chedoexport = 3
Then
sTenFileNen = strDest1 & "\" & strOwner & "_" & strTmp & "_" & s
trSTT & ".DMP"
sTenNguon = strDest1 & "\" & strOwner & "_" & strTmp & "_" & str
STT
End If
If chedoexport = 21 Then
sTenFileNen = s_folder
sTenNguon = s_folder 'strDest1
End If