ExecuteNonQuery() throws “Incorrect syntax near the keyword 'User'”
问题 I started learning C# last week and I'm now having trouble with an INSERT sql statement. I used the following code, then I tell you what happens. private void AddNewUserToDataBase(User user) { string commandText = "INSERT INTO User (firstName,lastName,adress,town,favoriteCurrency) " + "VALUES (@firstName,@lastName,@adress,@town,@favoriteCurrency)"; using (SqlConnection connection = new SqlConnection(global::Laboratoire1.Properties.Settings.Default.Database1ConnectionString)) { using