?? 備份.bas
字號:
Attribute VB_Name = "備份"
'
' If getDB Then '如果 weboy 數據庫存在,則...
' If getUsersTable And getConsumersTable Then '如果 users 表及 consumer 表存在,則...
' 'MsgBox "數據庫已存在"
' 'MsgBox "users 表已經存在"
' Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
' con.Open
' Call saveReg
' Call userLand
' con.Close
' ElseIf getUsersTable = False And getConsumersTable = True Then '當數據庫已找到,而表沒找到時
' MsgBox "數據庫已存在,users 表未找到,CConsumers 表已存在"
' If MsgBox("管理員表未找到,單擊 OK 按鈕創建", vbOKCancel, "系統錯誤") = vbOK Then
' Call createUTable
' MsgBox "用戶表已創建完成"
' End If
' ElseIf getUsersTable = True And getConsumersTable = False Then
' MsgBox "數據庫已存在,users 表已存在,CConsumers 表未找到"
' If MsgBox("用戶表未找到,單擊 OK 按鈕創建", vbOKCancel, "系統錯誤") = vbOK Then
' Call createCTable
' MsgBox "表已創建完成"
' End If
' ElseIf getUsersTable = False And getConsumersTable = False Then
' MsgBox "數據庫已存在,users 表未找到,CConsumers 表未找到"
' If MsgBox("管理員表及用戶表未找到,單擊 OK 按鈕創建", vbOKCancel, "系統錯誤") = vbOK Then
' Call createCTable
' Call createUTable
' MsgBox "表已創建完成"
' End If
' End If
' Else '當數據庫未到找時''''''
'
' End If
' End If
'''''''''''''''''''''''''''''''''''''''''''''
'判斷能否在 weboy 數據庫中找到 users 表
'Public Function getUsersTable() As Boolean
'
' Set con = New Connection
' Set rst = New Recordset
'
' getUsersTable = False
' Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
' con.Open
'
' rst.Open "select name from sysobjects where type='u'", con, adOpenDynamic, adLockOptimistic
' rst.MoveFirst
'
' Do While Not rst.EOF
' If rst!name = "users" Then
' getUsersTable = True
' Exit Do
' End If
' rst.MoveNext
' Loop
'
' rst.Close
' con.Close
'End Function
'判斷是能否在 weboy 數據庫中找到 consumer 表
'Public Function getConsumersTable()
'
' Set con = New Connection
' Set rst = New Recordset
'
' getConsumersTable = False
' Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
' con.Open
'
' rst.Open "select name from sysobjects where type='u'", con, adOpenDynamic, adLockOptimistic
' rst.MoveFirst
'
' Do While Not rst.EOF
' If rst!name = "CConsumers" Then
' getConsumersTable = True
' Exit Do
' End If
' rst.MoveNext
' Loop
'
' rst.Close
' con.Close
'End Function
'password = InputBox("請輸入密碼!")
'If password = "" Then
' MsgBox "密碼不能為空", vbExclamation, "取款不成功"
' Exit Sub
'Else
' rst.Open "select * from CConsumers where id='" & txt(0).Text & "'", con, adOpenDynamic, adLockOptimistic
' If password = rst!password Then
' rst.Close
' con.Execute "insert " & txt(0).Text & " values('" & nowDate & "','get','" & money & "','" & balance - money & "','" & userName & "')"
' con.Close
' MsgBox "取款成功"
' Exit Sub
' Unload Me
' Else
' rst.Close
' MsgBox "密碼不正確!"
' Exit Sub
' End If
'End If
'rst.Open "select spid from sysprocesses where dbid=db_id('hy')", con
'Do While Not rst.EOF
' Cn.Execute "kill " & rst("spid") '殺掉sql服務器的所有連接,否則會出現:數據庫正在使用,無法完成排它操作等等,很重要
' rst.MoveNext
'Loop
'rst.Close
' On Error Resume Next
' Dim rst As New Recordset
' Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
' con.Open
' rst.Open "select * from accrual", con, adOpenDynamic, adLockOptimistic
' rst.MoveFirst
' Do While Not rst.EOF
' If rst!theYear = "0" Then
' txtFA(0).Text = rst!percentage
' ElseIf rst!theYear = "1" Then
' txtFA(1).Text = rst!percentage
' ElseIf rst!theYear = "2" Then
' txtFA(2).Text = rst!percentage
' ElseIf rst!theYear = "3" Then
' txtFA(3).Text = rst!percentage
' ElseIf rst!theYear = "5" Then
' txtFA(5).Text = rst!percentage
' ElseIf rst!theYear = "8" Then
' txtFA(8).Text = rst!percentage
' End If
' rst.MoveNext
' Loop
' rst.Close
' con.Close
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -