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

📄 deletesysacc.frm

📁 vb做的银行管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form deleteSysacc 
   Caption         =   "删除帐户"
   ClientHeight    =   2700
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6435
   LinkTopic       =   "Form1"
   ScaleHeight     =   2700
   ScaleWidth      =   6435
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   3720
      TabIndex        =   4
      Top             =   2040
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "完成"
      Height          =   375
      Left            =   1560
      TabIndex        =   3
      Top             =   2040
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2040
      TabIndex        =   2
      Top             =   1200
      Width           =   2295
   End
   Begin VB.Label Label2 
      Caption         =   "请输入用户名:"
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   1320
      Width           =   1335
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "删除系统用户"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   960
      TabIndex        =   0
      Top             =   360
      Width           =   3855
   End
End
Attribute VB_Name = "deleteSysacc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim input1 As Boolean
input1 = False
Dim str As String
str = "select * from Susers"
Set cn = New adodb.Connection
Dim rst As Recordset
Set rst = New Recordset
cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=(local)"
cn.Open
rst.Open str, cn, adOpenDynamic, adLockOptimistic

rst.MoveFirst
Do While Not rst.EOF
If Trim(rst.Fields("ID")) = Text1.Text Then
input1 = True
End If
rst.MoveNext
Loop

If input1 = False Then
MsgBox "查无此用户!请重新输入!"
rst.Close
cn.Close
Exit Sub
End If
cn.Execute "delete from Susers where ID='" & Text1.Text & "'"
rst.Close
cn.Close
MsgBox "删除帐号成功!"
Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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