What is the primary purpose of using parameterized queries in ADO.NET?
- To automatically generate SQL queries
- To encrypt query parameters
- To improve query performance
- To prevent SQL injection attacks
Parameterized queries in ADO.NET help prevent SQL injection attacks by separating SQL code from user input. This reduces the risk of malicious SQL code being injected into the query, enhancing the security of the application.
Loading...
Related Quiz
- The ___________ class is responsible for managing the database schema in LINQ to Entities.
- What is LINQ to Entities primarily used for?
- What does LINQ stand for in the context of LINQ to DataSet?
- How does LINQ to Entities handle complex queries involving multiple tables and relationships?
- Which ADO.NET method is used to add parameters to a SqlCommand object?