Home > Software engineering >  Help: questions about the VB.net connection Access the Update
Help: questions about the VB.net connection Access the Update

Time:09-29

The code is as follows:

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. The Oledb. 4.0. The Data Source=SQL. MDB;"
Dim conn As New OleDbConnection (Path)
Dim updcmd As New OleDbCommand (" update UserDate set Money="& amp; Label2. Text & amp; "Where ID=" & amp; Label1. Text, conn.)
Conn. The Open ()
Updcmd. ExecuteNonQuery ()
Conn. Close ()

He's always said I Update statement syntax errors, seek help from a great god, thank you ~ ~!

CodePudding user response:

Money to try [money]

CodePudding user response:

How update the front there is a blank space? MOney is what kind of field?

CodePudding user response:

"The update UserDate set Money=" & amp; Label2. Text & amp; "Where ID=" & amp; Label1. Text

Put the string of the DEBUG out and see what is,
  • Related