SQLHELPER
I want to use stringbuilder in SQL Helper class, how can I use that?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tuhin PaulPosted Mar 16, 2023, 2:35 PM
Remember to sanitize and validate any input parameters before appending them to the SQL query string to prevent SQL injection attacks.
Tuhin PaulPosted Mar 16, 2023, 2:34 PM
It is not recommended to use StringBuilder in a SQL Helper class because it is vulnerable to SQL injection attacks. Instead, it is best to use parameterized queries to ensure the security and integrity of the database.
Rajeev KumarPosted Mar 16, 2023, 10:17 AM
StringBuilder class is defined in the System.Text namespace. You must either import this namespace in your class or reference it directly in the object instantiation.
using System.Text;
Munesh SharmaPosted Feb 14, 2015, 2:09 AM
Pradeep ShetPosted Feb 13, 2015, 2:24 PM
You need to Import a namespace.
using System.Text;