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 ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is autopostback in dropdownlist in asp net?

991


How can we pass info between 2 asp.net pages?

1073


What is _viewstart?

907


How do u deploy ur project?

2686


Is LINQ performance wise better or using sqlcommand?

5092


What does asp.net stand for?

1125


What is the use of session state and application state and difference between them?

915


Is it possible to apply themes to an asp.net application? If yes, then how?

1012


What is the difference between sealed vs static class?

1093


How do you store a value in viewstate and retrieve them?

1015


Explain asp.net page life cycle?

1081


Explain about Automatic resource management?

1051


Is it possible to migrate visual interdev design-time controls to asp.net?

1047


What does uri mean?

921


We Only Know The Total Number Of Feet In The Farmyard. Write A Program that will compute the total number of rabbits and chickens in the farmyard. Assume number of feet in the farmyard are 40. how many rabbits and chickens are?

878