📄 users_form.frm
字号:
VERSION 5.00
Begin VB.Form users_form
Caption = "users"
ClientHeight = 8115
ClientLeft = 3135
ClientTop = 1800
ClientWidth = 10050
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 8115
ScaleWidth = 10050
Begin VB.CommandButton Command2
Caption = "添加"
Height = 375
Left = 5760
TabIndex = 4
Top = 1920
Width = 1575
End
Begin VB.TextBox Text1
Height = 375
Left = 1800
TabIndex = 3
Top = 1920
Width = 3615
End
Begin VB.TextBox Text2
Height = 375
Left = 1800
TabIndex = 2
Top = 480
Width = 3615
End
Begin VB.CommandButton Command1
Caption = "修改"
Height = 375
Left = 5760
TabIndex = 0
Top = 480
Width = 1575
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Left = 1920
TabIndex = 5
Top = 1080
Width = 2415
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Name:"
Height = 180
Left = 1200
TabIndex = 1
Top = 600
Width = 450
End
End
Attribute VB_Name = "users_form"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
ado.con.ConnectionString = "driver=sql server;server=.;uid=sa;database=lib"
ado.con.Open
ado.users_rs.Open "users", con, adOpenStatic, adLockOptimistic, 2
ado.users_rs.MoveFirst
'Me.Label1.Caption = ado.users_rs.Fields("u_name")
ado.users_rs.Fields("u_name") = Me.Text2.Text
ado.users_rs.Update
ado.users_rs.Close
ado.con.Close
MsgBox "更新成功"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -