eveCalypso
Programmer
Good Day,
I have used Stored procedures for all of my SQL requirements from code (new language plus new at stored procs for SQL. So please be patient!)
I would like to now build on this layer of knowledge by building in transaction processing on the DB side, or on the coding side if not possible.
I know you can start, commit & rollback within a stored procedure, but what do you do if the logical flow of work is as follows:
selection
calculations1
some updates to the DB
calculations2
some inserts to the DB
wrap up calculations3
a delete off the DB
Now, I wrote these DB Stored Procedures to be re-usable in other parts of the program if neccessary - also, I can not just do all of the above in one go.
However, I would like all of them to fail if one failed - as this is in essence one transaction...
Any advice on how I can achieve this?? I am coding in VB with a SQL Server 2000 back-end.
Thank you in advance
Regards,
EvE
I have used Stored procedures for all of my SQL requirements from code (new language plus new at stored procs for SQL. So please be patient!)
I would like to now build on this layer of knowledge by building in transaction processing on the DB side, or on the coding side if not possible.
I know you can start, commit & rollback within a stored procedure, but what do you do if the logical flow of work is as follows:
selection
calculations1
some updates to the DB
calculations2
some inserts to the DB
wrap up calculations3
a delete off the DB
Now, I wrote these DB Stored Procedures to be re-usable in other parts of the program if neccessary - also, I can not just do all of the above in one go.
However, I would like all of them to fail if one failed - as this is in essence one transaction...
Any advice on how I can achieve this?? I am coding in VB with a SQL Server 2000 back-end.
Thank you in advance
Regards,
EvE