代碼如下:
Dim UserMoney As Double
Dim AddMoney As Double = 10000
Dim Sum As Double
UserMoney = Val(Label2.Text)
Sum = UserMoney + AddMoney
Label2.Text = Sum
TextBox1.Text = Sum
Dim Path As String = "Provider = Microsoft.Jet.Oledb.4.0;Data Source = SQL.mdb;"
Dim conn As New OleDbConnection(Path)
Dim updcmd As New OleDbCommand(" update UserDate set Money = " & Label2.Text & " where ID = " & Label1.Text, conn)
conn.Open()
updcmd.ExecuteNonQuery()
conn.Close()
就是老是說我Update陳述句語法錯誤,求大神幫助,謝謝~~!
uj5u.com熱心網友回復:
money改為 [money] 試試uj5u.com熱心網友回復:
update前面怎么有個空格?MOney是什么型別的欄位?uj5u.com熱心網友回復:
" update UserDate set Money = " & Label2.Text & " where ID = " & Label1.Text把這串DEBUG出來看看是什么。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/96711.html
