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
Does entity framework use ado.net?
Is datareader faster than datatable?
Define bubbled event?
What is basic use of data view?
What is the difference between a datareader and a dataset?
Explain the difference between sqlcommand object and command behavior object?
What is serialization and de-serialization in .net?
How to enable and disable connection pooling?
What is the role of data provider in ado.net?
What is a string variable?
Explain the difference between ado and ado.net?
What is disconnected architecture in ado.net?
Explain the advantage of ADO.Net?
What is ado asp?
Explain the differences between oledb sql server, oledbdotnet provider?