Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...



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 is localhost in asp.net?

0 Answers  


What data type does the Range Validator control support?

5 Answers  


What are runtime hosts?

2 Answers   Microsoft,


why we are using delegates and in which condition it is required?

3 Answers   TCS,


What is the difference between executescalar and executenonquery?

0 Answers  


What is the advantage of mvc over asp.net? : Asp.Net MVC

0 Answers  


How do you enable tracing? a) Set the Trace property of the Web Form to True b) Set the Trace property of the server object to True c) Set the Session variables Trace to True d) Set the Applications Variable Trace to True.

2 Answers   Syntax Softtech,


repeater and gridview diff? Why is repeater fast than gridview?

3 Answers   TCS,


I have got less marks in bsc it So how to get interview.tell me

1 Answers  


what is silver light when will we use silver light,

0 Answers  


What is server components?

0 Answers  


What are the validation controls ?

1 Answers  


Categories