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

How can u deifne the benefits and limitation of using Viewstate for state management?

1123


What is the purpose of session management?

997


Difference between web user control and web custom control?

919


How to use a Master Database in Asp.net?

1061


When does a session actually start?

1038


Where is asp.net view state stored?

997


What are sharepoint pages?

902


Explain what is the procedure to create the environment for asp.net? : asp.net mvc

1028


Name some asp objects?

1004


What is the significance of proxy user?

1079


how can create login from create and written conde in asp.net

2431


How does the iis work?

1027


What are the 3 types of web?

913


What are the merits and demerits of viewstate?

1040


Which method do you use to kill explicitly a users session?

1051