I’m making an update script for a given data base. The script must
- Update various things
- Add a column to a table
- Update various things
- Populate this column with specific values
(based on various calculations done in C#) - Update various things
The script must either succeed or fail AND leave the database unchanged.
My idea was to do it in a single transaction, but I get an error when populating the column:
This operation conflicts with another pending operation on this transaction.
Any idea?
No, no way. Sorry, You requirements are not cmopatible with the way SQL Server requires DML statements to be isolated.