[求助]怎么编写代码实现修改密码
怎么调用存储过程
别人这么做来着
相关代码
Imports System.Data.SqlClient
Dim conn As New SqlConnection("server=weiweiqun.;database=gz;integrated security=sspi")
Dim comm As New SqlCommand
Dim ds As New DataSet
Dim da As New SqlDataAdapter
button_click
If conn.State = ConnectionState.Closed Then
conn.Open()
End If
comm.Connection = conn
comm.CommandType = CommandType.Text
comm.CommandText = "update 员工密码表 set 密码 ='" & TextBox2.Text & "' where 姓名= '" & TextBox1.Text & "'"
da.SelectCommand = comm
da.Fill(ds, "员工密码表")
MessageBox.Show("用户密码修改成功", "提示信息")
If conn.State = ConnectionState.Open Then
conn.Close()
End If
[此贴子已经被作者于2006-12-6 13:02:44编辑过]