您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 基于VB客票中心售票系统
  所属分类: VB
  开发工具:
  文件大小: 2mb
  下载次数: 0
  上传时间: 2010-06-22
  提 供 者: zangy******
 详细说明: VERSION 5.00 Begin VB.Form FrmBackUp BackColor = &H00E7DFE7& BorderStyle = 1 'Fixed Single Caption = "备份数据库" ClientHeight = 1695 ClientLeft = 45 ClientTop = 330 ClientWidth = 4680 Icon = "FrmBackUp.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MDIChild = -1 'True MinButton = 0 'False ScaleHeight = 1695 ScaleWidth = 4680 Begin VB .CommandButton cmdExit Caption = "退出" Height = 495 Left = 2640 TabIndex = 3 Top = 840 Width = 1455 End Begin VB.CommandButton cmdBackUp Caption = "备份" Height = 495 Left = 600 TabIndex = 2 Top = 840 Width = 1455 End Begin VB.Label lbTime AutoSize = -1 'True BackStyle = 0 'Transparent Height = 180 Left = 240 TabIndex = 1 Top = 720 Visible = 0 'False Width = 90 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "单击“备份”按钮,开始备份数据库。" Height = 180 Left = 240 TabIndex = 0 Top = 240 Width = 3060 End End Attribute VB_Name = "FrmBackUp" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False 'Dim fso As New FileSystemObject, fldr As Folder Dim cn As ADODB.Connection Dim success As Long Private Sub cmdBackUp_Click() Dim backFile As String Dim NowTime As String Dim sql As String Dim buff As String If fso.FolderExists(App.Path & "\BackUp") = False Then Set fldr = fso.CreateFolder(App.Path & "\BackUp") End If NowTime = Format(Now, "yyyy-mm-dd_hh-mm-ss") backFile = "hotel" & NowTime sql = "BACKUP DATABASE hotel TO disk='" & App.Path & "\BackUP\" & backFile & "'" cn.Execute (sql) MsgBox "数据库备份成功!" & vbCrLf & "文件:" & backFile, vbOKOnly + vbInformation, "备份数据库" success = WritePrivateProfileString("BackUp", "NewFile", backFile, App.Path & "\Sims.ini") buff = String(255, 0) ret = GetPrivateProfileString("BackUp", "Time", "1", buff, 256, App.Path & "\Sims.ini") lbTime.Caption = buff Select Case lbTime.Caption Case "1" success = WritePrivateProfileString("BackUp", "File1", backFile, App.Path & "\Sims.ini") Case "2" success = WritePrivateProfileString("BackUp", "File2", backFile, App.Path & "\Sims.ini") Case "3" success = WritePrivateProfileString("BackUp", "File3", backFile, App.Path & "\Sims.ini") Case "4" success = WritePrivateProfileString("BackUp", "File4", backFile, App.Path & "\Sims.ini") Case "5" success = WritePrivateProfileString("BackUp", "File5", backFile, App.Path & "\Sims.ini") End Select lbTime.Caption = lbTime.Caption + 1 If lbTime.Caption = 6 Then lbTime.Caption = 1 End If success = WritePrivateProfileString("BackUp", "Time", lbTime.Caption, App.Path & "\Sims.ini") End Sub Private Sub cmdExit_Click() Unload Me End Sub Private Sub Form_Load() Set cn = New ADODB.Connection If cn.State = adStateOpen Then cn.Close With cn .ConnectionTimeout = 10 .Provider = "sqloledb" .ConnectionString = "data source=.;initial catalog=master;user id=sa;password=;" .Open End With End Sub ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: 客票
 输入关键字,在本站1000多万海量源码库中尽情搜索: