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

Which is better union or union all?

0 Answers  


Name two properties common in every validation control?

9 Answers   Siebel Systems,


how can u create the blog in asp.net with C#?what is the data type u will use to store in sql server?

0 Answers   IBM,


What is binding in web service ?

1 Answers   TCS,


What is the difference between an EXE and a DLL?

18 Answers   Infosys, JK Associates, Persistent, TATA, Technosoft, Wipro,






Where is session data stored in asp net?

0 Answers  


What are the advantages of asp.net mvc framework? : asp.net mvc

0 Answers  


What is the role of global.asax?

10 Answers   Infosys,


Describe briefly what is the role of IIS on an ASP.NET application? What does it for the same application?

0 Answers   InfoAxon Technologies,


What’s the difference between Response.Write() andResponse.Output.Write()?

1 Answers  


Can you explain the basic use of dataview?

0 Answers  


In Data grid the question is below quantity price total these are 3 fields available in data grid if you enter quantity the total has to update automatically.Price field is already filled completely

0 Answers   Quest,


Categories