?? frm_數(shù)據(jù)庫恢復(fù).frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Frm_數(shù)據(jù)庫恢復(fù)
Caption = "數(shù)據(jù)恢復(fù)"
ClientHeight = 2700
ClientLeft = 60
ClientTop = 345
ClientWidth = 5145
Icon = "Frm_數(shù)據(jù)庫恢復(fù).frx":0000
LinkTopic = "Form1"
ScaleHeight = 2700
ScaleWidth = 5145
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog CDialog
Left = 4710
Top = 2295
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.PictureBox Picture2
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 2715
Left = 3645
ScaleHeight = 2685
ScaleWidth = 1485
TabIndex = 1
Top = 0
Width = 1515
Begin VB.CommandButton SNXpEXIT
Caption = "退 出"
Height = 495
Left = 120
TabIndex = 5
Top = 1680
Width = 1215
End
Begin VB.CommandButton SNXpRESTORE
Caption = "數(shù)據(jù)恢復(fù)"
Height = 495
Left = 120
TabIndex = 4
Top = 720
Width = 1215
End
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 2715
Left = -30
ScaleHeight = 2685
ScaleWidth = 3660
TabIndex = 0
Top = 0
Width = 3690
Begin VB.Label Label2
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "遠(yuǎn)望提示您"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 315
Left = 465
TabIndex = 3
Top = 285
Width = 2685
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = $"Frm_數(shù)據(jù)庫恢復(fù).frx":030A
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800080&
Height = 1725
Left = 330
TabIndex = 2
Top = 630
Width = 3075
End
Begin VB.Shape Shape2
BorderColor = &H00FF8080&
Height = 2505
Left = 90
Top = 90
Width = 3480
End
Begin VB.Shape Shape1
BorderColor = &H00FF8080&
Height = 2625
Left = 30
Top = 30
Width = 3600
End
End
End
Attribute VB_Name = "Frm_數(shù)據(jù)庫恢復(fù)"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim SQLString As String
Private Sub SNXpBACKUP_Click() '''' 備份
CDialog.CancelError = True
CDialog.Filter = "Microsoft Access數(shù)據(jù)庫(*.mdb)|*.mdb"
On Error GoTo ERR:
CDialog.Action = 2
If Trim(CDialog.FileName) = "" Then Exit Sub
Set fsodata = CreateObject("Scripting.FileSystemObject")
If IsNull(fsodata) = True Then
MsgBox "文件系統(tǒng)錯誤!", vbInformation, "計量器具管理系統(tǒng)——錯誤信息"
Unload Me
Exit Sub
End If
fsodata.copyfile App.Path + "\MEMS.mdb", CDialog.FileName, True
MsgBox "備份數(shù)據(jù)成功!!", vbInformation, "濟(jì)寧遠(yuǎn)望提示"
Exit Sub
ERR:
MsgBox ERR.Description, vbInformation, "提示"
Exit Sub
End Sub
Private Sub SNXpEXIT_Click()
Unload Me
End Sub
Private Sub SNXpRESTORE_Click() ''''恢復(fù)
' 設(shè)置“CancelError”為 True
CDialog.CancelError = True
' 設(shè)置過濾器
CDialog.Filter = "Microsoft Access數(shù)據(jù)庫(*.mdb)|*.mdb"
On Error GoTo ERR:
CDialog.Action = 1
If Trim(CDialog.FileName) = "" Then Exit Sub
Set fsodata = CreateObject("Scripting.FileSystemObject")
If IsNull(obj) = True Then
MsgBox "文件系統(tǒng)錯誤!", vbInformation, "計量器具管理系統(tǒng)——錯誤信息"
Unload Me
Exit Sub
End If
fsodata.copyfile CDialog.FileName, App.Path + "\mems.mdb", True
MsgBox "數(shù)據(jù)恢復(fù)成功!!", vbInformation, "遠(yuǎn)望提示"
SQLString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\MEMS.mdb;Persist Security Info=False;Jet OLEDB"
If Conn.State = 1 Then Conn.Close
Conn.ConnectionString = SQLString
Conn.Open
Exit Sub
ERR:
MsgBox ERR.Description, vbInformation, "提示"
Exit Sub
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) * (1 - 0.618)
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -