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 A
You've got a table with the name "User", but that's a reserved keyword.
You could rename the table, or enclose it in brackets when you reference it:
string commandText = "INSERT INTO [User] (firstName ...
Change the table name from "User" to something else because User is a reserved keyword that cannot be used again, so if you use any other name for table the code will work fine example:-
create table User1(firstName varchar(20),lastName varchar(20),adress varchar(20),town varchar(20),favoriteCurrency int)