❔ Is this enough to clean a database entry?
I'm entering user-defined text into an SQL table but dont want my tables getting dropped. Does this work?
8 Replies
How are you doing the insert?
most SQL clients have ways to parameterize the query, so you are safe from injection
it's a text-based command through Microsoft.Data.Sqlite
so a
SqlCommand
?
it's not cute
look at this example
never ever use string interpolation or concats to make a query
use a parameterized query
i see
Parametrized queries are the one and only proper way to insert parameters into the query
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.