主题:一个简单问题
修改密码的代码
这个好像不难我也写了但是就是没用
所以来这里请教高手。我的运行环境是Microsoft Visual Studio .NET 2003
我的如下:
Dim tablename As String
tablename = "userid"
searchSQL = "select * from userid where (用户名='" & TextBox1.Text & "')"
Try
ExecuteSQL(searchSQL, tablename)
If myrow.Item(1) = TextBox2.Text Then
myrow.Item(1) = TextBox3.Text
mytable.GetChanges()
cmd = New OleDbCommandBuilder(ADOcmd)
ADOcmd.Update(ds, tablename)
MsgBox("密码修改成功!", vbOKOnly + vbExclamation, "警告")
Me.Hide()
Else
Exit Sub
End If
Catch
MsgBox("没有该用户!", vbOKOnly + vbExclamation, "警告")
End Try
请高手指点。谢谢!!
这个好像不难我也写了但是就是没用
所以来这里请教高手。我的运行环境是Microsoft Visual Studio .NET 2003
我的如下:
Dim tablename As String
tablename = "userid"
searchSQL = "select * from userid where (用户名='" & TextBox1.Text & "')"
Try
ExecuteSQL(searchSQL, tablename)
If myrow.Item(1) = TextBox2.Text Then
myrow.Item(1) = TextBox3.Text
mytable.GetChanges()
cmd = New OleDbCommandBuilder(ADOcmd)
ADOcmd.Update(ds, tablename)
MsgBox("密码修改成功!", vbOKOnly + vbExclamation, "警告")
Me.Hide()
Else
Exit Sub
End If
Catch
MsgBox("没有该用户!", vbOKOnly + vbExclamation, "警告")
End Try
请高手指点。谢谢!!