How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?



How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?..

Answer / Ramandeep Singh

To use a stored procedure in ADO.NET, you create a Command object and set its CommandType property to CommandType.StoredProcedure, and CommandText property to the name of your stored procedure. Parameters can be provided by adding Parameter objects to the Parameters collection of the Command object, setting their values before execution.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

What are the ado.net objects?

1 Answers  


How can we load multiple tables in to dataset?

1 Answers  


What are all components of ADO.Net data provider?

1 Answers  


What are the steps to connect to a database?

1 Answers  


How to work with disconnected data - the dataset and sqldataadapter?

1 Answers  


Define data adapter?

1 Answers  


What is Data view?

1 Answers  


How to store data in memory?

1 Answers  


About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data ?

1 Answers   MMTS,


What is execute reader in ado.net?

1 Answers  


What are the major difference between classic ADO and ADO.NET?

1 Answers  


How many major types of connection objects in ADO.NET?

1 Answers   MCN Solutions,


Categories