Click here to Skip to main content
12,820,108 members (25,167 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# SQL stored-procedure
I want to call two stored procedure within the event of click on save button
currently, i am calling single stored procedure and and execution is successful.
i want to call another stored procedure too, in same event,
please let me know the best and safe idea of calling multiple stored procedure within single event.

please if possible give me demo code snippet

waiting for your kind help

Posted 12-Mar-13 5:48am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could repeat the same process one after the other for both stored procedures.

However if you were going to do this I would wrap them around a "Transaction" object so that if one fails it will roll back both the changes.
Zoltán Zörgő 12-Mar-13 10:52am
Simple and correct. +5!
Pheonyx 12-Mar-13 10:54am
Thanks :)

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 12 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100