Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is datasource in ado.net?

1074


How do you find the count of records in a dataset?

978


What is ado.net object model?

988


Name which operations can you not perform on an ado.net dataset?

985


What is the difference between executenonquery () and executescalar ()?

957


Define partial class?

972


How will you differentiate between ADO (ActiveX Data Object) and RDO (Remote Data Objects)?

1032


What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?

999


Explian About DataAdapters

1031


Explain the basic use of "dataview" and explain its methods.

1003


What is difference between connected and disconnected architecture in ado.net?

1156


What is ado.net and its architecture?

1176


What are the parameters that control most of connection pooling behaviors?

1011


What is disconnected data?

1044


Is ado.net an orm?

963