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 is datasource in ado.net?
How do you find the count of records in a dataset?
What is ado.net object model?
Name which operations can you not perform on an ado.net dataset?
What is the difference between executenonquery () and executescalar ()?
Define partial class?
How will you differentiate between ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?
Explian About DataAdapters
Explain the basic use of "dataview" and explain its methods.
What is difference between connected and disconnected architecture in ado.net?
What is ado.net and its architecture?
What are the parameters that control most of connection pooling behaviors?
What is disconnected data?
Is ado.net an orm?