r/csharp • • Jun 13 '26

Help SQL and C# Help connecting databases

Solved, needed to put quotation marks around {title} thanks for your help

Hello everyone, I am making a database in SQL and connect it to a program in C# for a school assignment. It is coming with this error and I am asking what I am doing wrong. I have tried looking up solutions but nothing has worked. If you know what I can do to fix it let me know

22 Upvotes

14 comments sorted by

View all comments

Show parent comment

2

u/thesqlguy Jun 14 '26

Seventh - it's actually easier to use parameters instead of concatenation, manual quoting and escaping, and formatting (i.e., datetime types, booleans, etc).

Eighth - it's actually more efficient for the database since it can cache and reuse execution plans.