?? frm1.frm
字號:
VERSION 5.00
Object = "{B0475000-7740-11D1-BDC3-0020AF9F8E6E}#6.0#0"; "TTF16.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frm1
BorderStyle = 1 'Fixed Single
Caption = "數據同步工具V1.0"
ClientHeight = 7365
ClientLeft = 45
ClientTop = 330
ClientWidth = 10965
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frm1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 7365
ScaleWidth = 10965
StartUpPosition = 3 'Windows Default
Begin VB.CheckBox chkNoConnectD
Caption = "不連接目的數據庫"
Height = 255
Left = 9030
TabIndex = 8
ToolTipText = "選擇該選項時,輸出到SQL腳本將無需連接到目標數據庫上"
Top = 6300
Width = 1845
End
Begin VB.CommandButton cmdSelectDest
Caption = "選擇..."
Height = 300
Left = 9105
TabIndex = 3
ToolTipText = "打開目標"
Top = 450
Width = 855
End
Begin VB.CommandButton cmdSelectSource
Caption = "選擇..."
Height = 300
Left = 9105
TabIndex = 1
ToolTipText = "打開源數據庫配置文件"
Top = 90
Width = 855
End
Begin VB.CommandButton cmdSelectSQL
Caption = "選擇..."
Height = 300
Left = 7980
TabIndex = 7
ToolTipText = "選擇SQL腳本文件名"
Top = 6300
Width = 990
End
Begin VB.TextBox txtSQLFile
Height = 300
Left = 2550
TabIndex = 6
ToolTipText = "輸入SQL腳本文件名(全路徑)"
Top = 6300
Width = 5400
End
Begin VB.CheckBox chkSQL
Caption = "將操作輸出為SQL腳本文件"
Height = 240
Left = 105
TabIndex = 5
ToolTipText = "選擇該選項時,輸出將寫到指定的腳本文件中"
Top = 6345
Width = 2415
End
Begin VB.CommandButton cmdShowErrRecord
Caption = "錯誤記錄"
Height = 300
Left = 8445
TabIndex = 14
ToolTipText = "查看錯誤記錄"
Top = 6675
Width = 1200
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1000
Left = 6735
Top = 3750
End
Begin MSComctlLib.StatusBar sbar
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 20
Top = 7050
Width = 10965
_ExtentX = 19341
_ExtentY = 556
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 3528
MinWidth = 3528
Key = "starttime"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 3528
MinWidth = 3528
Key = "usetime"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 12197
Key = "info"
EndProperty
EndProperty
End
Begin MSComDlg.CommonDialog CD1
Left = 5460
Top = 3630
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton cmdDKQTPZ
Caption = "打開配置文件"
Height = 300
Left = 2520
TabIndex = 11
ToolTipText = "選擇一個配置列表文件"
Top = 6690
Width = 1410
End
Begin VB.CommandButton cmdClose
Caption = "關閉"
Height = 300
Left = 9660
TabIndex = 15
ToolTipText = "關閉本窗口"
Top = 6675
Width = 1200
End
Begin VB.CommandButton cmdStop
Caption = "停止"
Height = 300
Left = 7230
TabIndex = 13
ToolTipText = "停止操作"
Top = 6690
Width = 1200
End
Begin VB.CommandButton cmdStart
Caption = "開始"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 6015
TabIndex = 12
ToolTipText = "開始復制數據"
Top = 6690
Width = 1200
End
Begin VB.CommandButton cmdChange
Caption = "交換數據庫"
Height = 300
Left = 1290
TabIndex = 10
ToolTipText = "交換源數據庫和目標數據庫,交換后要重新連接數據庫"
Top = 6690
Width = 1200
End
Begin VB.CommandButton cmdConnect
Caption = "連接數據庫"
Height = 300
Left = 60
TabIndex = 9
ToolTipText = "連接數據庫"
Top = 6690
Width = 1200
End
Begin VB.TextBox txtD
Height = 300
Left = 1200
Locked = -1 'True
TabIndex = 2
ToolTipText = "打開目標數據庫配置文件"
Top = 435
Width = 7890
End
Begin VB.TextBox txtS
Height = 300
Left = 1200
Locked = -1 'True
TabIndex = 0
Top = 90
Width = 7890
End
Begin TTF160Ctl.F1Book F1
Height = 5400
Left = 75
TabIndex = 4
Top = 810
Width = 10815
_ExtentX = 19076
_ExtentY = 9525
_0 = $"frm1.frx":030A
_1 = $"frm1.frx":0713
_2 = $"frm1.frx":0B1C
_3 = $"frm1.frx":0F25
_4 = $"frm1.frx":132E
_count = 5
_ver = 2
End
Begin VB.Label lblD
Caption = "未連接"
ForeColor = &H00C00000&
Height = 255
Left = 10230
TabIndex = 19
Top = 465
Width = 660
End
Begin VB.Label lblS
Caption = "未連接"
ForeColor = &H00C00000&
Height = 240
Left = 10230
TabIndex = 18
Top = 120
Width = 645
End
Begin VB.Label Label2
Caption = "目標數據庫"
Height = 240
Left = 105
TabIndex = 17
Top = 510
Width = 1035
End
Begin VB.Label Label1
Caption = "源數據庫"
Height = 240
Left = 105
TabIndex = 16
Top = 120
Width = 1020
End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mobjDBS As clsDB '指向數據源的 XFDB 對象
Dim mobjDBD As clsDB '指向目標的 XFDB 對象
Dim mstrIniS As String '數據源配置文件
Dim mstrIniD As String '目標數據庫配置文件
Dim mdtm_Start As Date '當前操作起始時間
Dim mstrListFile As String '當前打開的配置列表文件
Dim mstrCP As String
Dim mfrmErr As frmErrRecord '錯誤記錄。
Private Type TYPE_FIELDDEFINE
FieldName As String
DataType As String
End Type
Private Sub chkSQL_Click()
If chkSQL.Value = 1 Then
chkNoConnectD.Enabled = True
Else
chkNoConnectD.Value = 0
chkNoConnectD.Enabled = False
End If
End Sub
Private Sub cmdChange_Click()
Dim S As String
S = mstrIniS
mstrIniS = mstrIniD
mstrIniD = S
S = txtS.Text
txtS.Text = txtD.Text
txtD.Text = S
If mobjDBS.Connect Then mobjDBS.Disconnect
If mobjDBD.Connect Then mobjDBD.Disconnect
lblS.Caption = "未連接"
lblD.Caption = "未連接"
End Sub
Private Sub cmdClose_Click()
If cmdStop.Enabled = True Then
cmdStop.Tag = "1"
Exit Sub
End If
Unload Me
End Sub
Private Sub cmdConnect_Click()
lblS.Caption = "未連接"
lblD.Caption = "未連接"
cmdStart.Enabled = False
If gFSO.FileExists(mstrIniS) = False Then
XF_MsgE "還未指定源數據庫配置文件!"
Exit Sub
End If
If gFSO.FileExists(mstrIniD) = False Then
XF_MsgE "還未指定目標數據庫配置文件!"
Exit Sub
End If
If mobjDBS.Init(mstrIniS) = False Then
XF_ShowErrInfo mobjDBS.ErrInfo, , , "打開源數據庫配置文件"
Exit Sub
End If
If mobjDBS.Connect = False Then
XF_ShowErrInfo mobjDBS.ErrInfo, , , "連接源數據庫"
Exit Sub
End If
mobjDBS.RecordDisConnect = False
lblS.Caption = "已連接"
If mobjDBD.Init(mstrIniD) = False Then
XF_ShowErrInfo mobjDBS.ErrInfo, , , "打開目標數據庫配置文件"
Exit Sub
End If
If chkSQL.Value = 1 And chkNoConnectD.Value = 1 Then
Else
If mobjDBD.Connect = False Then
XF_ShowErrInfo mobjDBS.ErrInfo, , , "連接目標數據庫"
Exit Sub
End If
lblD.Caption = "已連接"
mobjDBD.RecordDisConnect = False
End If
cmdStart.Enabled = True
End Sub
Private Sub cmdDKQTPZ_Click()
Dim S As String
On Error GoTo Err1
CD1.CancelError = True
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -