⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmbackup.frm

📁 这个是VB环境开发的,我也是转载的把原来的Access数据库改成了SQl Server数据库.希望大家可以借鉴
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmTip 
   Caption         =   "数据备份"
   ClientHeight    =   2040
   ClientLeft      =   2370
   ClientTop       =   2400
   ClientWidth     =   5715
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2040
   ScaleWidth      =   5715
   WhatsThisButton =   -1  'True
   WhatsThisHelp   =   -1  'True
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Default         =   -1  'True
      Height          =   375
      Left            =   4080
      TabIndex        =   5
      Top             =   840
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "备份"
      Height          =   375
      Left            =   4080
      TabIndex        =   4
      Top             =   240
      Width           =   1455
   End
   Begin MSComDlg.CommonDialog dlg 
      Left            =   4200
      Top             =   1440
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00FFFFFF&
      Height          =   1395
      Left            =   120
      Picture         =   "frmbackup.frx":0000
      ScaleHeight     =   1335
      ScaleWidth      =   3675
      TabIndex        =   1
      Top             =   120
      Width           =   3735
      Begin VB.Label Label1 
         BackColor       =   &H00FFFFFF&
         Caption         =   "备份数据库..."
         Height          =   495
         Left            =   540
         TabIndex        =   3
         Top             =   180
         Width           =   3135
      End
      Begin VB.Label lblTipText 
         BackColor       =   &H00FFFFFF&
         Height          =   1635
         Left            =   180
         TabIndex        =   2
         Top             =   840
         Width           =   3255
      End
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Enabled         =   0   'False
      Height          =   375
      Left            =   6120
      TabIndex        =   0
      Top             =   720
      Width           =   1455
   End
End
Attribute VB_Name = "frmTip"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim s$

Private Sub Command1_Click()
On Error GoTo gl
dlg.DialogTitle = "请选择及输入被份文件的路径及文件名!"
dlg.Filter = "数据文件(*.mdb)"
dlg.ShowSave
s = dlg.Filename
If s = "" Then
cmdOK.Enabled = False
Exit Sub
End If

If Right(s, 3) <> "mdb" Then

s = s & ".mdb"
End If
cmdOK.Enabled = True
MsgBox "您备份的数据文件在" & s
Label1.Caption = "您备份的数据文件在" & s
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim y As Variant
y = fso.copyfile(App.Path & "\data\jxcdb.mdb", s)
  MsgBox "  备份数据完成!   ", , ginfo
Exit Sub
gl: MsgBox err.Description

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -