Click here to Skip to main content
11,632,104 members (72,339 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL StoredProcedures
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

regards
bunzitop
Posted 12-Mar-13 4:48am
bunzitop1.1K

1 solution

Rate this: bad
good
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.
  Permalink  
Comments
Zoltán Zörgő at 12-Mar-13 10:52am
   
Simple and correct. +5!
Pheonyx at 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
0 OriginalGriff 8,393
1 Sergey Alexandrovich Kryukov 8,044
2 Mika Wendelius 6,260
3 F-ES Sitecore 2,321
4 Suvendu Shekhar Giri 1,970


Advertise | Privacy | Mobile
Web04 | 2.8.150728.1 | Last Updated 12 Mar 2013
Copyright © CodeProject, 1999-2015
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