none
update 更改数据库记录问题,提示update语句出错 RRS feed

  • 问题

  • 大家好,帮我看看这段代码,提示 update 语句出错。谢谢
    Dim dbConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Picture.mdb;Persist Security Info=True;Jet OLEDB:Database Password=lt;"
            Dim dbConnection As OleDbConnection = New OleDbConnection(dbConnectionString)
            dbConnection.Open()
    Dim str As String
            str = "update login set password='" & Textnewpw.Text & "' where user='" & idpublic & "'"
            Dim dbcommand1 As OleDbCommand = New OleDbCommand(str, dbConnection)
            Try
                dbcommand1.ExecuteNonQuery()
            Catch ex As Exception
                MsgBox(ex.Message.ToString)
            End Try

    昨夜西风凋碧树,独上高楼,望尽天涯路!
    2009年9月25日 2:59

答案

全部回复