i need code for insert,delete,update adn display records
using stored procedure in C#
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
What is difference cookie and session?
What is the difference between debug and release?
Can you edit data in the Repeater control?
what are partial classes and their use?
Explain the different types of assemblies?
Why is validation always done on the server? When does that occur?
What is session authentication?
Explain the difference between Repeater and Data list control in ASP.NET?
what is the difference between primary key and foreign key?
How would one do a deep copy in .NET?
When does a session actually start?
To bind columns manually which tags do you need to add within the asp:datagrid ?