in reply to Catch connection error MSSQL

Both suggested solutions work (and the original one too) if I add a or die to the connect statement. I am not sure why. The script keeps running but the "Died" message is passed.