Matt Berther posts here on how to execute SQL Server scripts using ADO.NET, which has its own set of tricks because of the GO-delimiters.

This reminded me that I implemented precisely this feature, though in a different way, for the original SqlTask in NAntContrib for NAnt. Several people have modified the original code since, but you can probably still see traces of the original code here and there. It was a little bit more general purpose, though, since it allowed configurable statement delimiters, including both regular expression-based ones and a few other thingies.


Tomas Restrepo

Software developer located in Colombia.