The AddBatch() method
That's exactly right. AddBatch will append a batch of SQL to the end of
the ExecutionBlock. Batch markers aren't added automatically; you'd need to
use the AddBatchMarker method to append a GO onto the end. The transactional
plumbing is done elsewhere, so you'd need to add those bits in yourself, if
you find you need them.
Red Gate Technical Support
"Chris Tybur" <[email protected]> wrote in message
> I presume ExecutionBlock.AddBatch() adds a T-SQL batch to the generated
> SQL stored in the ExecutionBlock object. A couple of questions: does it
> add the script to the beginning or end of the script? Does it insert a
> batch end marker (GO)? Does it put the same 'plumbing' code after the
> batch to allow for a rollback if the batch fails?