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 are the HTML server controls in ASP.NET?

568


What is razor? : asp.net mvc

553


What is an asp.net validator? And, mention its types.

586


What are the navigation ways between pages available in ASP.NET?

565


What are html helpers in asp.net?

521






What's the use of response.output.write()?

758


Can we have a web application running without web.config file?

521


How to automatically get the latest version of all the asp.net solution items from source safe when opening the solution?

517


What is the use of response redirect in asp.net?

575


What is the difference between viewstate and hidden field in asp.net?

486


What is advantage of code behind coding in ASP.NET?

557


What’s the use of “GLOBAL.ASAX” file?

596


Name the tools or API for developing or testing web api?

529


What is is post back property in asp net?

533


What does asp in asp.net stand for?

515