Call a stored procedure from ado.net and pass parameter to it ?
Answer Posted / narayansahu
create a connection object
create a command object like so
SqlCommand comm=new SqlCommand("storedprocname",conn)
comm.commandtype=cmmandtype.storedprocedure
and then add parameters like:
comm.parameters.addwithvale("@userid",textbox1.text)
comm.parameters.addwithvalue(@username",textbox2.text)
that's it
Is This Answer Correct ? | 19 Yes | 4 No |
Post New Answer View All Answers
Which is faster sqldataadapter and sqldatareader?
What is ado oledb and odbc?
What is DataReader Object?
What is the DataTableCollection?
What is commandbuilder in ado.net?
What is the difference between DataReader and DataSet in ADO.NET?
Explain why edit is not possible in repeater?
What is ado in agriculture?
If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?
How to aggregating data across related tables?
What does ado stand for in ado.net?
What are all the different authentication techniques used to connect to MS SQL Server?
List the 4 common ado.net namespaces?
What is sqlconnection and sqlcommand?
Which is better entity framework or ado.net?