[Solved] add user input in database [duplicate]
[ad_1] Well first of all you don’t have quotes around your string. You’re also missing a plus sign. It should be like: string sql1 = “insert into items values ( ‘” + this.name + “‘)”; However, this is a really bad way of handling your SQL queries through C#. You should be using parameterized queries! … Read more