SQL Insert Query Using C#
I'm having an issue at the moment which I am trying to fix. I just tried to access a database and insert some values with the help of C# The things I tried (worked) String query = "INSERT INTO dbo.SMS_PW (id,username,password,email) VALUES ('abc', 'abc', 'abc', 'abc')"; A new line was inserted and everything worked fine, now I tried to insert a row using variables: String query = "INSERT INTO dbo.SMS_PW (id,username,password,email) VALUES (@id, @username, @password, @email)"; command.Parameters.AddWithValue("@id","abc") command.Parameters.AddWithValue("@username","abc") command.Parameters