yuzj064 发表于 2007-12-12 13:39

求VB.NET做密码修改,高手请进来一下

麻烦那位高手帮我看下面的代码有什么问题。
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim db As DataBase = New DataBase
        Try
            Dim dv As DataView = db.RunDelOrInsSQL("updata 用户清单 set 密码='" _
           & Me.TextBox3.Text.Trim & "'where id='" + UserId + "'")
            MsgBox("修改成功!")
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

fairy4 发表于 2007-12-12 13:53

是Update 不是Updata

fairy4 发表于 2007-12-12 13:57

要想知道錯誤就不要用try來處理錯誤,我只在程序測試無誤才在一些可能出錯的地方+上try,再發布!

tntzwc 发表于 2007-12-14 08:42

是啊。

页: [1]

编程论坛