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

📄 删除图书.frm

📁 功能齐全的图书管理系统。包含设计文档
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 删除图书 
   Caption         =   "删除图书"
   ClientHeight    =   3495
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5775
   LinkTopic       =   "Form1"
   ScaleHeight     =   3495
   ScaleWidth      =   5775
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   375
      Left            =   3360
      TabIndex        =   3
      Top             =   2280
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   1320
      TabIndex        =   2
      Top             =   2280
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   2160
      TabIndex        =   1
      Top             =   1680
      Width           =   1215
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "请输入需要删除的图书编号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   1440
      TabIndex        =   0
      Top             =   840
      Width           =   2775
   End
End
Attribute VB_Name = "删除图书"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim Error_num As Integer
If Text1.Text = "" Then
    MsgBox "数据输入不完整,请重新输入!", vbOKOnly, "输入错误!"
    Exit Sub
End If
Mycom.ActiveConnection = Mycon
Mycom.CommandType = adCmdStoredProc
Mycom.CommandText = "删除图书"
Mycom.Parameters(1) = 0
Mycom.Parameters(2) = Text1.Text
Mycom.Execute
Error_num = Mycom.Parameters(1)
If Error_num = 2 Then
    MsgBox "该图书编号不存在!请重新输入!"
    Text1.Text = ""
Else
    If Error_num = 3 Then
        MsgBox "该图书被借出!不能删除该图书信息!"
        Text1.Text = ""
    Else: MsgBox "该图书信息已成功从“图书信息”表中删除!", vbOKOnly, "删除成功!"
    End If
End If
Set Mycom = Nothing
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Me.Show
End Sub

⌨️ 快捷键说明

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