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
What are the uses of Stored Procedure?
What is ado.net in vb net?
What are the benefits of using ado.net?
What is the difference between sqldatareader and sqldataadapter?
Explain ado.net features?
What is the difference between ADO and ADO.Net?
What is the difference between a datareader and a dataset?
How can we perform transactions in .net?
describe the dataset object in ado.net.
What is an orm, and why would you use one instead of plain old ado.net?
Which is better ole db or odbc?
how Sequence to connect and retrieve data from database using dataset?
What are the main differences between classic ado and ado.net?
What are all features of ADO.Net?
Explain the role of data provider in ado.net?