midADO.NET
What is SqlParameter?
Updated Apr 28, 2026
Short answer
SqlParameter represents a parameter to a SQL query.
Deep explanation
It ensures safe and efficient query execution by avoiding SQL injection and enabling query plan reuse.
Real-world example
Filtering queries by user input.
Common mistakes
- Wrong data types.
Follow-up questions
- Why parameterized queries?
- What is DbType?