Call a stored procedure from ado.net and pass parameter to it ?

Answer Posted / guest

create con as connection object,cmd as command object
cmd.CommandType=CommandType.Storedprocedure
cmd.CommandText="storedprecedurename"
cmd.ExecuteNonQuery()

Is This Answer Correct ?    16 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create dynamic gridview?

793


What provider ado.net use by default? Explain the role of data provider in ado.net?

728


List all the steps in order, to access a database through ado.net?

812


What is datatable in ado.net?

712


How to copy the contents from one table to another table and how to delete the source table in ado.net?

747


What is ado.net and its architecture?

714


What are the key features of ado.net?

863


What is the functionality of data provider in ado.net?

676


Explain how to pass multiple tables in datasets simultaneously?

757


Can we do database operations without using any of the ado.net objects?

760


How do I delete a row from a DataTable?

779


What is dataset and datatable in ado.net?

712


How can we load multiple tables in to dataset?

798


What are good ado.net object to replace to ado recordset object.

784


What are the 3 major types of connection objects in ado.net?

754