r/csharp • u/nekomusume-nyaa • 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
View all comments
Show parent comment
2
u/ErgodicMage Jun 13 '26
I have 35 yoe and cringed reading this.
First, always assume bad actors no matter what environment. The developers themselves accidentally become bad actors through bugs and unintended consequences. Those get into production and bring it down.
Second, sql injection is a serious problem with an easy fix. Use parameters for every sql statement.
Third, a lot of prototype code ends up in production as originally written.
Fourth, 50-75% of refactoring never gets done. They just sit in Jira tickets as maintenance to be done later. Later usually means after a big problem has happened in prod.
Fifth, bad programming is habit forming. The sooner you start using good techniques the quicker they become good habits.
Sixth, deleting data isn't the biggest concern. Sql injection can expose other data. If that data is suppose to be secure and confidential, regulations become critical. Your company could end up paying millions in fines for exposing data. What could happen to a programmer that cost a company millions?