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
Explain what benefit does your code receive if you decorate it with attributes demanding specific security permissions?
What are the server controls in asp.net?
What is special types forms
Why we are using mvc instead of asp.net? : Asp.Net MVC
What is the use of worker process in asp.net?
What are the difference between function and stored procedure in .net programming language?
Explain about ASP.NET?
What is the equivalent of date() and time() in asp.net?
What is the use of session?
Which .NET framework supports Web API?
What is the life-span of the items in the viewstate?
Is asp.net core faster?
Can user control be stored in library?
how can we create wcf in asp.net and how can we cll that in to asp.net application?plsss tel me each step clearly
How to reduce the width of textbox in editcommandcolumn of datagrid?