- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Begin VB.Form main_xtgl_sjcsh
- BorderStyle = 3 'Fixed Dialog
- ClientHeight = 3795
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4680
- Icon = "main_xtgl_sjcsh.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3795
- ScaleWidth = 4680
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin MSComctlLib.ProgressBar ProgressBar1
- Height = 255
- Left = 75
- TabIndex = 4
- Top = 2940
- Visible = 0 'False
- Width = 4545
- _ExtentX = 8017
- _ExtentY = 450
- _Version = 393216
- Appearance = 1
- End
- Begin VB.CommandButton cmdDel
- Caption = "初始化"
- Height = 360
- Left = 2940
- TabIndex = 3
- Top = 3315
- Width = 1230
- End
- Begin VB.CommandButton cmdNotAllSel
- Caption = "全不选"
- Height = 360
- Left = 1665
- TabIndex = 2
- Top = 3315
- Width = 1230
- End
- Begin VB.CommandButton cmdAllSel
- Caption = "全选"
- Height = 360
- Left = 390
- TabIndex = 1
- Top = 3315
- Width = 1230
- End
- Begin VB.ListBox List1
- Height = 2790
- ItemData = "main_xtgl_sjcsh.frx":000C
- Left = 75
- List = "main_xtgl_sjcsh.frx":000E
- Style = 1 'Checkbox
- TabIndex = 0
- Top = 60
- Width = 4545
- End
- End
- Attribute VB_Name = "main_xtgl_sjcsh"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim i As Integer
- Private Sub Form_Load()
- Me.Caption = text
- Dim rstSchema As ADODB.Recordset
- Set rstSchema = Cnn.OpenSchema(adSchemaTables)
- Do Until rstSchema.EOF
- If Left(rstSchema!TABLE_NAME, 3) <> "sys" And Left(rstSchema!TABLE_NAME, 3) <> "dtp" Then
- List1.AddItem rstSchema!TABLE_NAME
- End If
- rstSchema.MoveNext
- Loop
- rstSchema.Close
- End Sub
- Private Sub cmdAllSel_Click() '全选
- For i = 0 To List1.ListCount - 1
- List1.Selected(i) = True
- Next i
- End Sub
- Private Sub cmdNotAllSel_Click() '全不选
- For i = 0 To List1.ListCount - 1
- List1.Selected(i) = False
- Next i
- End Sub
- Private Sub cmdDel_Click() '清除所选表中数据
- Dim Counter As Integer '定义一个整型变量
- Dim Workarea(250) As String '定义字符串变量
- ProgressBar1.Visible = True
- ProgressBar1.Max = UBound(Workarea)
- ProgressBar1.Min = LBound(Workarea)
- '设置进度的值为 Min
- ProgressBar1.Value = ProgressBar1.Min
- '在整个数组中循环
- For Counter = LBound(Workarea) To UBound(Workarea)
- '设置数组中每项的初始值
- Workarea(Counter) = Counter
- ProgressBar1.Value = Counter
- For i = 0 To List1.ListCount - 1
- If List1.Selected(i) = True Then
- Cnn.Execute ("delete from " & List1.List(i))
- End If
- Next i
- Next Counter
- ProgressBar1.Visible = False
- ProgressBar1.Value = ProgressBar1.Min
- End Sub