加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

VB 图书管理系统

发布时间:2020-12-17 07:31:38 所属栏目:百科 来源:网络整理
导读:VB 简单图书管理系统设计 图书管理系统源代码下载 (包含源代码、数据库、设计报告) 一、基本概述 基于VB,mysql数据库 拥有可操作界面 实现基本图书管理功能 二、数据库的概念设计 图书信息 图书信息:{书号,书名,作者,分类号,出版社,价格,摘要,入馆

VB 简单图书管理系统设计

图书管理系统源代码下载(包含源代码、数据库、设计报告)

一、基本概述

  1. 基于VB,mysql数据库
  2. 拥有可操作界面
  3. 实现基本图书管理功能

二、数据库的概念设计

  1. 图书信息

    图书信息:{书号,书名,作者,分类号,出版社,价格,摘要,入馆日期,是否在架}

  2. 读者用户信息

    读者用户信息:{读者号(用户ID),密码,姓名,性别,单位,类型,身份证号,罚款金额,办理日期,住址,电话,邮箱}

  3. 管理员信息

    管理员信息:{账号,密码,姓名,性别是否删除}

  4. 借阅信息

    借阅信息:{借阅编号,读者号(用户ID),书号,借书时间,还书时间,是否已归还}

系统E-R图

三.部分运行截图

'登陆页代码
Private Sub Command1_Click()

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim stru$,strp$,strsql$
Static count As Byte
stru = Text1.text
strp = Text2.text
username = Text1.text

If stru = "" Then
MsgBox "用户名不能为空,请输入用户名!","登陆错误"
Text1.SetFocus
Exit Sub
ElseIf strp = "" Then
MsgBox "密码不能为空,请输入密码!","登陆错误"
Text2.SetFocus
Exit Sub
End If
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset

conn.Open "provider=SQLOLEDB.1;datasource=(local);persist security info=false;integrated security=sspi;database=bms"


rs.Open "select * from ruser where ruser='" & stru & " 'and rpsw='" & strp & "'; ",conn

If rs.EOF Then
count = count + 1
MsgBox "用户名不存在或者密码错误!","登录失败"
Text1.text = ""
Text2.text = ""
Text1.SetFocus
Else
logins = True
username = rs("ruser").Value
pass = rs("rpsw").Value
F_index.Show
Me.Hide
End If
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
If count >= 3 Then
MsgBox "超过登录次数,无权登录本系统!","登录失败"
End
End If
End Sub


Private Sub Command2_Click()

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim stru$,strsql$
Static count As Byte
stru = Text1.text
strp = Text2.text
If stru = "" Then
MsgBox "用户名不能为空,请输入用户名!","登陆错误"
Text2.SetFocus
Exit Sub
End If
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset

conn.Open "provider=SQLOLEDB.1;datasource=(local);persist security info=false;integrated security=sspi;database=bms"


rs.Open "select * from auser where auser='" & stru & " 'and apsw='" & strp & "'; ","登录失败"
Text1.text = ""
Text2.text = ""
Text1.SetFocus
Else
logins = True
username = rs("auser").Value
pass = rs("apsw").Value
F_a_index.Show
Me.Hide
End If
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
If count >= 3 Then
MsgBox "超过登录次数,无权登录本系统!","登录失败"
End
End If
End Sub

Private Sub Command3_Click()
Text1.text = ""
Text2.text = ""
Text1.SetFocus
End Sub

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读