'Where is the Syntax error in this VB.net code, is that any syntax error?
I cant find error as it told that got syntax error for my insert command
cmd.Connection = Con
cmd.Connection.Open()
cmd.CommandText = "INSERT INTO Order ([USERNAME], [PHONENO], [EMAIL], [ADDRESS], [MODEL], [QUANTITY], [PRICE]) Values(@n, @p, @e, @a @m, @q, @price);"
'cmd.CommandText = "INSERT INTO tblUsers ([USERNAME], [PASSWORD], [STATUS]) Values (" & "'" & tbxName.Text & "'," & "'" & UCase(tbxPass.Text) & "'," & "'" & status & " ');"
cmd.Parameters.AddWithValue("@n", currentUser)
cmd.Parameters.AddWithValue("@p", PhoneNum)
cmd.Parameters.AddWithValue("@e", email)
cmd.Parameters.AddWithValue("@a", address)
cmd.Parameters.AddWithValue("@m", Content.phone)
cmd.Parameters.AddWithValue("@q", Content.quantity)
cmd.Parameters.AddWithValue("@price", Content.x)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
