Is there an OO operation that can execute an MS SQL script?

I need an operation that can execute an MS SQL script that is in the following form. So operation that I've found errors out at "GO" -- it seems that it can only handle the basic SQL statements, and each statement needs to end with a semicolon. Note that this statements works no problem if I enter it into MS SQL Developer. Is there a way to mirror that behavior from OO?

SET DATEFORMAT ymd
GO
--
-- NOCOUNT on insert
--
SET NOCOUNT ON
GO

-- Wrap in transaction
--
BEGIN TRANSACTION
BEGIN TRY

-- ~1000 insert statements here


-- CheckRowcount
--
DECLARE @after_rc int
SELECT @after_rc = COUNT(*) FROM Units.SD_FundDetails

IF 8503<> @after_rc
BEGIN
    IF @@TRANCOUNT > 0
        ROLLBACK TRANSACTION
SELECT 'Incorrect number of rows in table Units.SD_FundDetails'
    RAISERROR('Incorrect number of rows in table Units.SD_FundDetails', 18, 1)
END
END TRY
BEGIN CATCH
    SELECT 
        ERROR_NUMBER() AS ErrorNumber,
        ERROR_SEVERITY() AS ErrorSeverity,
        ERROR_STATE() as ErrorState,
        ERROR_PROCEDURE() as ErrorProcedure,
        ERROR_LINE() as ErrorLine,
        ERROR_MESSAGE() as ErrorMessage

    IF @@TRANCOUNT > 0
        ROLLBACK TRANSACTION
	  RAISERROR('Insert failed - check above message', 18, 1)
END CATCH

IF @@TRANCOUNT > 0
    COMMIT TRANSACTION
GO

--
-- Disable NOCOUNT on insert
--
SET NOCOUNT OFF
GO

Tags: