大家帮助看一下,哪里错了
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickDim olecon As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=d:\info.mdb;jet oledb:database password=123")
Dim olestr As String = "select 密码 from info"
Dim olecmd As New OleDbCommand(olestr, olecon)
Dim olereader As OleDbDataReader
olecon.Open()
olereader = olecmd.ExecuteReader
olereader.Read()
If TextBox1.Text = olereader.GetString(0).Trim Then
If TextBox2.Text = TextBox3.Text Then
olereader.Close()
= CommandType.Text
= "update info set 密码=" & TextBox2.Text.Trim
olecmd.ExecuteNonQuery()
Else
MsgBox("两次密码输入不一致!")
End If
Else
MsgBox("原密码不正确!")
End If
olecon.Close()
End Sub
运行后,提示至少有一个参数没有被指定值 好像是
= "update info set 密码=" & TextBox2.Text.Trim
没有给值,还是我写法错误呀