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
What is autopostback in dropdownlist in asp net?
How can we pass info between 2 asp.net pages?
What is _viewstart?
How do u deploy ur project?
Is LINQ performance wise better or using sqlcommand?
What does asp.net stand for?
What is the use of session state and application state and difference between them?
Is it possible to apply themes to an asp.net application? If yes, then how?
What is the difference between sealed vs static class?
How do you store a value in viewstate and retrieve them?
Explain asp.net page life cycle?
Explain about Automatic resource management?
Is it possible to migrate visual interdev design-time controls to asp.net?
What does uri mean?
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?