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

📄 修改密码.frm

📁 一个用VB+SQL+SERVER+2000写的学生信息管理系统.rar
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 修改密码 
   Caption         =   "密码修改"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   1920
      TabIndex        =   7
      Top             =   2400
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   495
      Left            =   360
      TabIndex        =   6
      Top             =   2400
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   2
      Left            =   1440
      TabIndex        =   5
      Top             =   1560
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   1
      Left            =   1440
      TabIndex        =   4
      Top             =   960
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Index           =   0
      Left            =   1440
      TabIndex        =   3
      Top             =   240
      Width           =   1455
   End
   Begin VB.Label Label3 
      Caption         =   "确认密码"
      Height          =   495
      Left            =   240
      TabIndex        =   2
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "新密码"
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   1080
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "用户名称"
      Height          =   495
      Left            =   360
      TabIndex        =   0
      Top             =   360
      Width           =   975
   End
End
Attribute VB_Name = "修改密码"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim con  As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i As Integer

Private Sub Command1_Click()
con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=学生信息管理系统"
rs.Open "select * from user1 where 用户名称='" & Trim(Text1(0).Text) & "'", con, adOpenKeyset, adLockOptimistic
If Trim(Text1(1)) = Trim(Text1(2)) Then

For i = 0 To 2
rs.Fields(i) = Trim(Text1(i).Text)
Next i
MsgBox "成功修改数据", 48, "修改信息"
rs.Update
Else
MsgBox "密码不一致,重新输入", vbExclamation + vbOKOnly, "提示"
End If
'Set MSHFlexGrid1.DataSource = con.Execute("select * from 登录表")
rs.Close
con.Close
End Sub

Private Sub Command2_Click()
Me.Hide
End Sub

⌨️ 快捷键说明

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