Just edited this subroutine so I can now save a value for language and font.
It worked perfectly fine before, but now it gives me a syntax error with the sql string.
Sub insertuservalues(conn, a, b, c, d, e, f)
Dim sql As String = "INSERT INTO tblUserDetails(Name,Username,[Password],Email,Language,Font) VALUES (@name, @username, @password, @email, @language, @font)"
Using connection As New OleDbConnection(conn)
Using command As New OleDbCommand(sql, connection)
connection.Open()
command.Parameters.Add("@name", OleDbType.VarWChar).Value = a
command.Parameters.Add("@username", OleDbType.VarWChar).Value = b
command.Parameters.Add("@password", OleDbType.VarWChar).Value = c
command.Parameters.Add("@email", OleDbType.VarWChar).Value = d
command.Parameters.Add("@language", OleDbType.VarWChar).Value = e
command.Parameters.Add("@font", OleDbType.VarWChar).Value = f
command.ExecuteNonQuery()
connection.Close()
End Using
End Using
End Sub
Fields Language and Font were added to the table, and all the variables passed have a valid value. Why could this be?