May 20, 2011 at 9:46 am
Hi
Tried looking on the web but couldn't find a solution for whether its possible to input parameters to stored procedures at different times.
For example, lets say that I have a table that has a column for Index and a column showing names. Now I want to change the index using a stored procedure but only want to save it once I click a save button on the application that I am developing. Is it possible to Begin Transaction in T-SQL but only Commit Transaction or Rollback Transaction based on the save input which would be provided later?
May 20, 2011 at 9:53 am
kubersingh711 (5/20/2011)
Is it possible to Begin Transaction in T-SQL but only Commit Transaction or Rollback Transaction based on the save input which would be provided later?
If I understand your question correctly you can't commit the transaction until you have the data needed to complete the transaction.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
May 20, 2011 at 9:59 am
You wouldn't want to leave a transaction open for any length of time as that would cause blocking.
I guess you'd have to save the various values that are set in the application and then pass them in one go to the "Save" stored procedure.
May 20, 2011 at 10:07 am
True that, good point!
Wonder why I dint think of that.
Thanks!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply