I'm trying to launch the following code from a button and I get the error in the image:
button code
sCmd = "INSERT INTO Vendedores (Password,Grupo) VALUES ('151515',0)"
GestionSql.Launch(sCmd)
GestionSql.Launch code: (line 55 of the error is the ExecuteNonQuery)
Public Sub Launch(ByVal value As String)
Try
oCommand.CommandText = value
oCommand.CommandType = CommandType.Text
oCommand.Connection = oConection
oConection.Open()
oCommand.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
oConection.Close()
oCommand.Dispose()
End Sub
Database: (password type short text, group type number)
I don't understand the error, with DELETE, SELECT, etc. I have no problems...
The only problem you have is the following:
The field
Password
as such is a reserved word , so place square brackets[]
to be able to use said field.[Password]
So:
This will solve your problem, Regards!