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 are the uses of Stored Procedure?

1112


What is ado.net in vb net?

965


What are the benefits of using ado.net?

1050


What is the difference between sqldatareader and sqldataadapter?

1020


Explain ado.net features?

1102


What is the difference between ADO and ADO.Net?

1121


What is the difference between a datareader and a dataset?

1100


How can we perform transactions in .net?

1103


describe the dataset object in ado.net.

996


What is an orm, and why would you use one instead of plain old ado.net?

1098


Which is better ole db or odbc?

954


how Sequence to connect and retrieve data from database using dataset?

1353


What are the main differences between classic ado and ado.net?

1057


What are all features of ADO.Net?

1043


Explain the role of data provider in ado.net?

1044