How do you pass parameters to a stored procedure in ADO.NET?
- By embedding parameters in the procedure name
- Through direct SQL queries
- Using OleDbCommand parameters
- Using SqlParameter objects
In ADO.NET, parameters are passed to a stored procedure using SqlParameter objects. These objects allow for type-safe and secure parameter passing, helping prevent SQL injection attacks and ensuring correct data types.
Loading...
Related Quiz
- The Entity Framework enables developers to work with data using a ___________-first approach.
- Explain the concept of data binding expressions in ASP.NET and give an example.
- Which method is used to advance the data reader to the next record in the result set?
- To retrieve different data types from a data reader, you can use the _______ method.
- In Entity Framework, the Entity Data Model (EDM) represents the structure of the underlying ___________.