Which ADO.NET class or object is commonly used to create parameterized queries?
- SqlCommand
- SqlConnection
- SqlDataAdapter
- SqlDataReader
The SqlCommand class in ADO.NET is commonly used to create parameterized queries. It allows developers to define parameter placeholders in SQL queries and then assign values to these parameters programmatically, helping to prevent SQL injection attacks and improve query performance.
Loading...
Related Quiz
- When using the SqlDataAdapter to fill a dataset, what SQL statement is typically provided to retrieve data?
-
In Entity Framework, what is a DbSet
? - Scenario: In a hierarchical dataset representing a company's organizational structure, you need to find all employees reporting to a specific manager. Which ADO.NET feature would you utilize to achieve this?
- Scenario: You are developing a WinForms application that needs to display a list of products from a database. Which control and data binding method would you use to achieve this?
- In ADO.NET, what is the primary role of the DataAdapter?