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...


i need code for insert,delete,update adn display records
using stored procedure in C#

Answer Posted / poornima

create proc produrename
@id int,
@name varchar(50),
@Add varchar(50),
@choice Varchar(30)

as
begin
if(@choice='insert')
begin
insert into tablename values(@id,@name,@Add)
end
if(@choice='update')
begin
update tablename set name=@name,Add=@Add where id=@id
end
if(@choice='delete')
begin
delete from tablename where id=@id
end
if(@choice='display')
begin
select * from tablename where id=@id
end
end

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between ispostback and autopostback in asp net?

960


What are html helpers in asp.net?

1015


What does passport and windows authentication mean in ASP.NET?

1127


Is asp.net and .net same?

933


How does session work?

862


What is the significance of proxy user?

1028


What is runat?

1003


Explain the difference between server control and html control.

879


What are the merits and demerits of viewstate?

978


What is http protocol and how it works?

968


Explain the difference between AutoPostBack and IspostBack in ASP.NET?

1019


14. What are your Future Plans for Swatz Oils GROUP U.K?

2142


How do we access view state value of this page in the next page?

955


Explain the difference between asp & asp.net.

964


What’s the catch?

1043