In SO and elsewhere it’s nearly impossible to post long concatenated SQL instructions in sample code without someone politely pointing out that it’s better to use parameterized input and stored procedures.
Recent example here.
But is it meaningful to worry about SQL injection in a Winforms project?
Is there some reason not to write safe database code? I don’t think so.
Everyone should get into the habit of executing SQL safely, so you won’t even have to think about it when you write public apps.
Also consider that a lot of code that’s intended to be private will end up becoming accessible publicly months or years later. For example, “hey this intranet app for inventory reporting is useful, why don’t we upload it to our public website for our business partners to use?”
1, then sort bydatecolumn. If user enters2then sort bystatuscolumn.