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
What are the HTML server controls in ASP.NET?
What is razor? : asp.net mvc
What is an asp.net validator? And, mention its types.
What are the navigation ways between pages available in ASP.NET?
What are html helpers in asp.net?
What's the use of response.output.write()?
Can we have a web application running without web.config file?
How to automatically get the latest version of all the asp.net solution items from source safe when opening the solution?
What is the use of response redirect in asp.net?
What is the difference between viewstate and hidden field in asp.net?
What is advantage of code behind coding in ASP.NET?
What’s the use of “GLOBAL.ASAX” file?
Name the tools or API for developing or testing web api?
What is is post back property in asp net?
What does asp in asp.net stand for?