I need help with the following error in the following images the code in which the error occurs is displayed
I need help with the following error in the following images the code in which the error occurs is displayed
What I can say is that you should use parameters, concatenate the DELETE values in the string is not a good practice
Dim eliminar As String = "DELETE FROM cuarto WHERE id = @Id"
Dim c As New oleDbCommand(eliminar, conexion)
c.parameters.AddWithValue("@Id", Convert.Toint32(textid.Text))
c.ExecuteNonQuery()
It is also important to assign the parameter respecting the data type, if the id field is numeric you must assign the parameter with a valid number
Note: if the id is nuemrico, remove the single quotes