OK I modified to suit my SQL server environment.
I run the script and it errors out on line 46 which is this.

Code:
   
If @ERROR <> 0
GoTo ADO_Error
EndIf



It says something about that not existing. Please help.