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 major difference between classic ADO and ADO.NET?
Define data adapter?
Does entity framework use ado.net?
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?
What is isolation?
What is the role of clr?
Explain what is datagrid with an example?
how Sequence to connect and retrieve data from database using dataset?
What is data control techniques?
Define Execute Scalar?
What is ado object model?
What are the steps to connect to a database?
Which object needs to be closed?
What do you know about ADO.NET's objects and methods?
What is difference between executequery and executeupdate?