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 / vagdevi

By using the SQLHelper of Microsoft,
in Business Layer import Microsoft.ApplicationBlocks.Data
and then,
Create properties for the parameters as userid,password
Declare a parameter array of Type SqlParameter as,

SqlParameter[] p=new SqlParameter[2];

p[0]=new SqlParameter("@userid",userid");
p[0].DbType=DbType.String;
p[0].Direction=ParameterDirection.Input;

p[1]=new SqlParameter("@password",password");
p[1].DbType=DbType.String;
p[1].Direction=ParameterDirection.Input;

SqlHelper.ExecuteNonQuery
(ConnetionString,CommandType.StoredProcedure,"StoredProcedur
eName", p);

That's it and call this method in your Presentation Layer

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages and disadvantages of using datalist?

1001


What is DataReader Object?

997


Explain the role of data provider in ado.net?

947


What is bubbled event?

922


What is ado.net and its architecture?

1086


What is ole in vb?

860


Data reader read and forward only, how is it possible to get 2 tables of data at a time?

872


Which one of the objects is a high-level abstraction of the connection and command objects in ado.net?

1099


Explain ado.net features?

995


Explain how to pass multiple tables in datasets simultaneously?

990


Define the data provider classes that is supported by ado.net?

922


Explain the two fundamental objects in ado.net?

916


What is serialization and de-serialization in .net?

887


What is method to get XML and schema from Dataset? getXML() and get Schema ()

931


What is the difference between statement and preparedstatement interface?

959