i need code for insert,delete,update adn display records
using stored procedure in C#

Answers were Sorted based on User's Feedback



i need code for insert,delete,update adn display records using stored procedure in C#..

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

i need code for insert,delete,update adn display records using stored procedure in C#..

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

Post New Answer

More ASP.NET Interview Questions

What are the Types of authentications in IIS

0 Answers   Microsoft,


Explain the difference between asp.net mvc and asp.net webforms? : asp.net mvc

0 Answers  


what is the trace in ASP.NET

4 Answers  


Where is the view state data stored?

0 Answers  


Types of state management techniques ?

6 Answers   Digital GlobalSoft,


How to add DateTime Control in normal DataGrid Server Control?

0 Answers  


What is web.config. How many web.config files can be allowed to use in an application ?

10 Answers   Accenture, BirlaSoft, Infosys, InterGraph, Satyam, Wipro,


To redirect the user to another page which method do we use without performing a round trip to the client?

0 Answers   Siebel,


What layout mode is the default when a new Web Form is created? a) GridBagLayout b) GridLayout c) FlowLayout d) FormLayout

2 Answers   Syntax Softtech,


how we use web services

2 Answers  


What is the Difference B/W Finalize() and Dispose() in .Net?

12 Answers   HCL, IBM,


If there is submit button in a from tell us the sequence what happens if submit is clicked and in form action is specified as some other page ?

1 Answers   MMTS,


Categories