Click here to Skip to main content
15,885,887 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm new to .Net platform. I have a doubt that how to write single stored procedure for insert,update and delete to multiple tables. Can anyone suggest me that how to do this efficiently?

here i got the link there they passed null value for delete.
if so, How do i pass NULL value for delete operation from C# to stored procedure
Posted
Updated 3-Dec-10 17:32pm
v3
Comments
Abhinav S 3-Dec-10 23:11pm    
Removed bold.
Dr.Walt Fair, PE 3-Dec-10 23:16pm    
Have you tried Google or Bing?

Check this[^] link out.
 
Share this answer
 
Already I have answered for the similar question here which was asked a month before.

Single Stored procedure for insert,update,delete to multiple table[^]

Do customizations based on your need(I mean you need to include multiple Insert/Update/Delete queries in the stored procedure).
 
Share this answer
 
Insert the data from another table, then follow the below way..:rose::thumbsdown:

INSERT INTO InsCarriers_Copy
                                (   InsCarrierId,
                                    InsCarrierName,
                                    ShortDescription,
                                    ContactPhoneNo,
                                    Location,
                                    PhoneExt,
                                    Fax,
                                    Address1,
                                    Address2,
                                    ZipCode,
                                    City,
                                    State,
                                    IsActive
                                )
SELECT      InsCarrierId,
            InsCarrierName,
            ShortDescription,
            ContactPhoneNo,
            Location,
            PhoneExt,
            Fax,
            Address1,
            Address2,
            ZipCode,
            City,
            [State],
            IsActive
FROM        InsCarriers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900